-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Older browser versions querySelector error #391
Comments
Hi @hhatakeyama, and thank you for opening your issue. Chrome 86 looks like it came out over 2 years ago, and the global usage of it is very small. For Samsung browser v13, it is even less. Before I go about making any changes, I have a few questions:
Thanks for your time! |
Hey @rpearce thanks for the reply. Thanks for your attention, and great work! |
@hhatakeyama Ok, I will look into this. |
I'm sorry I haven't circled back to this. Other things have taken priority. Is this still an issue for you, @hhatakeyama? |
I'm still encountering this error frequently. A possible solution could be to use the |
@pacocoursey @hhatakeyama Is this what that would basically look like? let selector = `:is(img, svg, [role="img"], [data-zoom]):not([aria-hidden="true"])`
if (!CSS.supports(selector)) {
selector = `img:not([aria-hidden="true"]), svg:not([aria-hidden="true"]), [data-zoom]:not([aria-hidden="true"])`
} At which point maybe it's just better to do this... const selector = ['img', 'svg', '[data-zoom]']
.map(x => `${x}:not([aria-hidden="true"])`)
.join(',')
document.querySelector(selector) What do y'all think? edit: How does this PR look to you (#402)? If you like the approach, I can publish a release candidate, have you test it out, and if it's all good for you, we can publish it fully. |
Can y'all please 🙏 try this fix out? |
Issue Type
Description
On older chrome versions (tested on v86.0) and samsung internet browser (tested on v13), the following error was reported on sentry:
Failed to execute 'querySelector' on 'Element': ':is(img, svg, [role="img"], [data-zoom]):not([aria-hidden="true"])' is not a valid selector.
The text was updated successfully, but these errors were encountered: