Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Ignores not working in Safari / Firefox #60

Open
kmikiy opened this issue Sep 7, 2021 · 1 comment
Open

Ignores not working in Safari / Firefox #60

kmikiy opened this issue Sep 7, 2021 · 1 comment

Comments

@kmikiy
Copy link

kmikiy commented Sep 7, 2021

This line is never true in Safari or Firefox

if (typeof event.path == "object") {

I tried this in Safari and Firefox and these ignores won't work. Everything works fine in Chrome

System Health

version core-2021.9.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.6
os_name Linux
os_version 5.10.17-v7l
arch armv7l
timezone Europe/Budapest
Home Assistant Community Store
GitHub API ok
Github API Calls Remaining 4981
Installed Version 1.15.2
Stage running
Available Repositories 879
Installed Repositories 10
AccuWeather
can_reach_server ok
remaining_requests 11
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 6.3
update_channel stable
supervisor_version supervisor-2021.09.0
docker_version 20.10.7
disk_total 57.8 GB
disk_used 3.2 GB
healthy true
supported true
board rpi4
supervisor_api ok
version_api ok
installed_addons Home Assistant Google Drive Backup (0.104.3), File editor (5.3.3), Terminal & SSH (9.1.3), Duck DNS (1.13.0), Z-Wave JS (0.1.38)
Lovelace
dashboards 2
resources 6
views 7
mode storage
@kmikiy
Copy link
Author

kmikiy commented Sep 8, 2021

Using event.composedPath() instead of path solved the issue for me. Apparently, it won't work in Edge though, but should work in Safari / Firefox / Chrome.
It should be supported in all popular browsers except Internet Explorer

   ...
    if (typeof event.composedPath() == "object") {
      for (let element of event.composedPath()) {
        if (element.nodeName == "HUI-VIEW") break;
        else if (ignored.indexOf(element.nodeName) > -1) return;
      }
    }
  ...

Source:
https://stackoverflow.com/questions/36845515/mouseevent-path-equivalent-in-firefox-safari

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant