From 56c5d28eded6e69fc2576c078f4aecac2c381e89 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 6 Jul 2015 00:29:15 -0700 Subject: [PATCH] Frontend: disable selecting text in cards/sidebar/header Fixes #200 --- .../frontend/www_static/polymer/cards/state-card.html | 4 ++++ .../frontend/www_static/polymer/components/ha-sidebar.html | 6 ++++++ .../frontend/www_static/polymer/layouts/partial-base.html | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/homeassistant/components/frontend/www_static/polymer/cards/state-card.html b/homeassistant/components/frontend/www_static/polymer/cards/state-card.html index 95d02164085..85b04e9bdb9 100644 --- a/homeassistant/components/frontend/www_static/polymer/cards/state-card.html +++ b/homeassistant/components/frontend/www_static/polymer/cards/state-card.html @@ -16,6 +16,10 @@ cursor: pointer; overflow: hidden; + + -ms-user-select: none; + -webkit-user-select: none; + -moz-user-select: none; } diff --git a/homeassistant/components/frontend/www_static/polymer/components/ha-sidebar.html b/homeassistant/components/frontend/www_static/polymer/components/ha-sidebar.html index c8c8e32ebfb..8746ee126c8 100644 --- a/homeassistant/components/frontend/www_static/polymer/components/ha-sidebar.html +++ b/homeassistant/components/frontend/www_static/polymer/components/ha-sidebar.html @@ -19,6 +19,12 @@ Too broken for now. background: #fafafa; box-shadow: 1px 0 1px rgba(0, 0, 0, 0.1); overflow: hidden; + + white-space: nowrap; + + -ms-user-select: none; + -webkit-user-select: none; + -moz-user-select: none; } /*.sidenav paper-menu { diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html b/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html index 66f67015f81..3e1e5cc57fc 100644 --- a/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html +++ b/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html @@ -6,6 +6,13 @@ +