Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile click accessibility #11447

Merged
merged 3 commits into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 5 additions & 1 deletion src/entrypoints/app.ts
Original file line number Diff line number Diff line change
@@ -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 "../resources/ha-style";
import "../resources/roboto";
import "../util/legacy-support";

setPassiveTouchGestures(true);
setCancelSyntheticClickEvents(false);
3 changes: 3 additions & 0 deletions src/entrypoints/authorize.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
// Compat needs to be first import
import "../resources/compatibility";
import { setCancelSyntheticClickEvents } from "@polymer/polymer/lib/utils/settings";
import "../auth/ha-authorize";
import "../resources/ha-style";
import "../resources/roboto";
import "../resources/safari-14-attachshadow-patch";
import "../resources/array.flat.polyfill";

setCancelSyntheticClickEvents(false);

/* polyfill for paper-dropdown */
setTimeout(
() => import("web-animations-js/web-animations-next-lite.min"),
Expand Down
5 changes: 4 additions & 1 deletion src/entrypoints/custom-panel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Compat needs to be first import
import "../resources/compatibility";
import { setCancelSyntheticClickEvents } from "@polymer/polymer/lib/utils/settings";
steverep marked this conversation as resolved.
Show resolved Hide resolved
import "../resources/safari-14-attachshadow-patch";

import { PolymerElement } from "@polymer/polymer";
Expand All @@ -15,6 +16,8 @@ import { createCustomPanelElement } from "../util/custom-panel/create-custom-pan
import { loadCustomPanel } from "../util/custom-panel/load-custom-panel";
import { setCustomPanelProperties } from "../util/custom-panel/set-custom-panel-properties";

setCancelSyntheticClickEvents(false);

declare global {
interface Window {
loadES5Adapter: () => Promise<unknown>;
Expand Down Expand Up @@ -47,7 +50,7 @@ function initialize(
) {
const style = document.createElement("style");

style.innerHTML = `body { margin:0; }
style.innerHTML = `body { margin:0; }
@media (prefers-color-scheme: dark) {
body {
background-color: #111111;
Expand Down
3 changes: 3 additions & 0 deletions src/entrypoints/onboarding.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
// Compat needs to be first import
import "../resources/compatibility";
import { setCancelSyntheticClickEvents } from "@polymer/polymer/lib/utils/settings";
import "../onboarding/ha-onboarding";
import "../resources/ha-style";
import "../resources/roboto";
import "../resources/safari-14-attachshadow-patch";
import "../resources/array.flat.polyfill";

setCancelSyntheticClickEvents(false);

declare global {
interface Window {
stepsPromise: Promise<Response>;
Expand Down
1 change: 1 addition & 0 deletions src/resources/compatibility.ts
Original file line number Diff line number Diff line change
@@ -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 "regenerator-runtime/runtime";
import "lit/polyfill-support";
Expand Down