mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-10 02:46:38 +00:00
Mobile click accessibility (#11447)
This commit is contained in:
parent
cc2db9a761
commit
fb55ab197f
@ -1,7 +1,11 @@
|
|||||||
import { setPassiveTouchGestures } from "@polymer/polymer/lib/utils/settings";
|
import {
|
||||||
|
setPassiveTouchGestures,
|
||||||
|
setCancelSyntheticClickEvents,
|
||||||
|
} from "@polymer/polymer/lib/utils/settings";
|
||||||
import "../layouts/home-assistant";
|
import "../layouts/home-assistant";
|
||||||
import "../resources/ha-style";
|
import "../resources/ha-style";
|
||||||
import "../resources/roboto";
|
import "../resources/roboto";
|
||||||
import "../util/legacy-support";
|
import "../util/legacy-support";
|
||||||
|
|
||||||
setPassiveTouchGestures(true);
|
setPassiveTouchGestures(true);
|
||||||
|
setCancelSyntheticClickEvents(false);
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
// Compat needs to be first import
|
// Compat needs to be first import
|
||||||
import "../resources/compatibility";
|
import "../resources/compatibility";
|
||||||
|
import { setCancelSyntheticClickEvents } from "@polymer/polymer/lib/utils/settings";
|
||||||
import "../auth/ha-authorize";
|
import "../auth/ha-authorize";
|
||||||
import "../resources/ha-style";
|
import "../resources/ha-style";
|
||||||
import "../resources/roboto";
|
import "../resources/roboto";
|
||||||
import "../resources/safari-14-attachshadow-patch";
|
import "../resources/safari-14-attachshadow-patch";
|
||||||
import "../resources/array.flat.polyfill";
|
import "../resources/array.flat.polyfill";
|
||||||
|
|
||||||
|
setCancelSyntheticClickEvents(false);
|
||||||
|
|
||||||
/* polyfill for paper-dropdown */
|
/* polyfill for paper-dropdown */
|
||||||
setTimeout(
|
setTimeout(
|
||||||
() => import("web-animations-js/web-animations-next-lite.min"),
|
() => import("web-animations-js/web-animations-next-lite.min"),
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
// Compat needs to be first import
|
// Compat needs to be first import
|
||||||
import "../resources/compatibility";
|
import "../resources/compatibility";
|
||||||
|
import { setCancelSyntheticClickEvents } from "@polymer/polymer/lib/utils/settings";
|
||||||
import "../resources/safari-14-attachshadow-patch";
|
import "../resources/safari-14-attachshadow-patch";
|
||||||
|
|
||||||
import { PolymerElement } from "@polymer/polymer";
|
import { PolymerElement } from "@polymer/polymer";
|
||||||
@ -15,6 +16,8 @@ import { createCustomPanelElement } from "../util/custom-panel/create-custom-pan
|
|||||||
import { loadCustomPanel } from "../util/custom-panel/load-custom-panel";
|
import { loadCustomPanel } from "../util/custom-panel/load-custom-panel";
|
||||||
import { setCustomPanelProperties } from "../util/custom-panel/set-custom-panel-properties";
|
import { setCustomPanelProperties } from "../util/custom-panel/set-custom-panel-properties";
|
||||||
|
|
||||||
|
setCancelSyntheticClickEvents(false);
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
loadES5Adapter: () => Promise<unknown>;
|
loadES5Adapter: () => Promise<unknown>;
|
||||||
@ -47,7 +50,7 @@ function initialize(
|
|||||||
) {
|
) {
|
||||||
const style = document.createElement("style");
|
const style = document.createElement("style");
|
||||||
|
|
||||||
style.innerHTML = `body { margin:0; }
|
style.innerHTML = `body { margin:0; }
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
body {
|
body {
|
||||||
background-color: #111111;
|
background-color: #111111;
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
// Compat needs to be first import
|
// Compat needs to be first import
|
||||||
import "../resources/compatibility";
|
import "../resources/compatibility";
|
||||||
|
import { setCancelSyntheticClickEvents } from "@polymer/polymer/lib/utils/settings";
|
||||||
import "../onboarding/ha-onboarding";
|
import "../onboarding/ha-onboarding";
|
||||||
import "../resources/ha-style";
|
import "../resources/ha-style";
|
||||||
import "../resources/roboto";
|
import "../resources/roboto";
|
||||||
import "../resources/safari-14-attachshadow-patch";
|
import "../resources/safari-14-attachshadow-patch";
|
||||||
import "../resources/array.flat.polyfill";
|
import "../resources/array.flat.polyfill";
|
||||||
|
|
||||||
|
setCancelSyntheticClickEvents(false);
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
stepsPromise: Promise<Response>;
|
stepsPromise: Promise<Response>;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// Caution before editing - For latest builds, this module is replaced with emptiness and thus not imported (see build-scripts/bundle.js)
|
||||||
import "core-js";
|
import "core-js";
|
||||||
import "regenerator-runtime/runtime";
|
import "regenerator-runtime/runtime";
|
||||||
import "lit/polyfill-support";
|
import "lit/polyfill-support";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user