Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/panels/lovelace/hui-root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ class HUIRoot extends LitElement {
);
}

protected firstUpdated(changedProperties: PropertyValues): void {
super.firstUpdated(changedProperties);
const userAgent = navigator.userAgent;

if (userAgent.match(/Android/) && userAgent.match(/Chrome/)) {
Comment thread
iantrich marked this conversation as resolved.
Outdated
this.classList.toggle("disable-text-select", true);
}
}

protected render(): TemplateResult | void {
return html`
<app-route .route="${this.route}" pattern="/:view" data="${
Expand Down Expand Up @@ -282,11 +291,14 @@ class HUIRoot extends LitElement {
haStyle,
css`
:host {
--dark-color: #455a64;
--text-dark-color: #fff;
}

.disable-text-select {
Comment thread
iantrich marked this conversation as resolved.
Outdated
-ms-user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
--dark-color: #455a64;
--text-dark-color: #fff;
}

ha-app-layout {
Expand Down