querySelector() if quote and/or square bracket on the right side of the attribute selector was missing, it won't report an error, but Safari will
Reported by
vhp...@msn.com,
Oct 31 2017
|
||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36
Steps to reproduce the problem:
Try something like document.querySelector('meta[name="description');
NOTE: double quote and square bracket on the right side was missing.
But it works perfectly and won't report an error!
What is the expected behavior?
It should not work and report error.
What went wrong?
No ieda.
Did this work before? N/A
Chrome version: 62.0.3202.75 Channel: stable
OS Version: 10.0
Flash Version:
,
Oct 31 2017
,
Nov 1 2017
Checked the issue on the reported chrome version stable 62.0.3202.75 and on the latest canary 64.0.3254.0 using Windows 10, Ubuntu 14.04 and Mac 10.12.6. As the issue is seen from M50(50.0.2634.0) treating it as non-regression and marking as untriaged.
,
Nov 2 2017
Can CSS people triage this?
,
Nov 2 2017
Behavior on Firefox is same as on Chrome, missing quote and square bracket works and does not report an error. This seems to be the relevant spec https://drafts.csswg.org/selectors-4/#attribute-selectors I can't find any explicit mention in the spec of whether a missing closing brace or quote should result in an error.
,
Nov 2 2017
We should raise a CSS WG issue ( https://github.com/w3c/csswg-drafts/issues ) for the spec to be clarified, and mention how the various browsers currently behave.
,
Nov 3 2017
,
Nov 3 2017
In CSS file / <style> element, if do this, Chrome will ignore the rules in the selector, I think maybe should make CSS file and querySelector() behave the same.
,
Nov 3 2017
Behavior on Edge is the same as on Chrome and Firefox.
,
Nov 3 2017
Raised https://github.com/w3c/csswg-drafts/issues/1933
,
Nov 3 2017
,
Nov 6 2017
Chrome/Edge/Firefox are correct. Works as Intended.
,
Nov 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e696bfacfee0f956e9d832dab288b795fde7047b commit e696bfacfee0f956e9d832dab288b795fde7047b Author: Eric Willigers <ericwilligers@chromium.org> Date: Mon Nov 06 23:18:13 2017 wpt: querySelector with missing right token Add Web Platform Test for user-reported difference in behavior between Safari and Chrome/Edge/Firefox. Correct behavior confirmed in https://github.com/w3c/csswg-drafts/issues/1933 BUG= 779942 Change-Id: I808b39a7cb678a6efe09991697abdabef54384f9 Reviewed-on: https://chromium-review.googlesource.com/755015 Reviewed-by: Bugs Nash <bugsnash@chromium.org> Commit-Queue: Eric Willigers <ericwilligers@chromium.org> Cr-Commit-Position: refs/heads/master@{#514284} [add] https://crrev.com/e696bfacfee0f956e9d832dab288b795fde7047b/third_party/WebKit/LayoutTests/external/wpt/css/selectors/missing-right-token.html
,
Nov 7 2017
#13 - woo hoo! You beat me to it. :) |
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by dtapu...@chromium.org
, Oct 31 2017