New issue
Advanced search Search tips
Starred by 7 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 520519
issue 520520

Blocking:
issue 565760



Sign in to add a comment
link

Issue 423975: Blink allows synthetic MouseEvents mousedown event to open select flyout

Reported by bogdan.b...@gmail.com, Oct 16 2014

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2190.0 Safari/537.36

Example URL:
hbogo.com/activate

Steps to reproduce the problem:
Open hbogo.com/activate in WebKit/Blink based mobile browser and try expanding popup select control. It does work in WebKit/Blink mobile browsers, but doesn't work in IE/Firefox.

What is the expected behavior?
The working group has a discussions on this topic - including specific thread I've started - http://lists.w3.org/Archives/Public/public-webapps/2014OctDec/0121.html and earlier W3C bug discussion https://www.w3.org/Bugs/Public/show_bug.cgi?id=12230

What went wrong?
WebKit/Blink allow synthetic events other than click to cause actions and this is believed to be a bug and not spec compliant behavior. 

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 40.0.2190.0  Channel: canary
OS Version: 6.4
Flash Version: Shockwave Flash 15.0 r0

Full disclosure - I'm Program Manager in Internet Explorer Layout team and we've identified this issue while testing compatibility for web sites. The page above does work in WebKit/Blink-based browsers on mobile, but doesn't work on IE/Firefox based mobile browsers because IE/Firefox are spec compliant in this case and WebKit/Blink are not. If necessary we can help with outreach to the site to avoid compatibility problems, but we cannot fix this in IE for example as this is generally accepted to be WebKit/Blink issue. We do want to improve interoperability for the web.
 

Comment 1 by ajha@chromium.org, Oct 16 2014

Labels: -Via-Wizard Cr-Blink-DOM

Comment 2 by tkent@chromium.org, Oct 17 2014

Labels: -Cr-Content -Cr-Blink-DOM Cr-Blink-Forms-Select Cr-Blink-Forms

Comment 3 by rbyers@chromium.org, Feb 1 2015

Cc: rbyers@chromium.org
Labels: -OS-Windows OS-All Hotlist-InputDev
Status: Available
I support fix this!  We'll of course need to be careful to avoid breakage, but we should absolutely work to do the right thing here.

Comment 4 by rbyers@chromium.org, Feb 3 2015

Owner: rbyers@chromium.org
Status: Started
Folks from MS OpenTech are working on a patch for this here: https://codereview.chromium.org/894913002

Assigning to myself to track until the OpenTech folks have accounts in the bug tracker.

Comment 5 by rbyers@chromium.org, Mar 5 2015

See some discussion of this general problem here: https://www.w3.org/Bugs/Public/show_bug.cgi?id=12230#c58

Comment 6 by rbyers@chromium.org, Mar 30 2015

Here's an example site that will probably be broken by this change: 
http://www.porsche.com/ 'region' select box.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1149020 for details.

One site isn't enough reason to change our decision here, but we need to accumulate a list of known breaks as we find them.

Comment 7 by bugdroid1@chromium.org, Apr 17 2015

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9dd425b727e5635d29b47010ab5f119e89a5143a

commit 9dd425b727e5635d29b47010ab5f119e89a5143a
Author: kirk.shoop <kirk.shoop@microsoft.com>
Date: Fri Apr 17 22:40:09 2015

add Kirk Shoop to AUTHORS

BUG= 423975 
R=rbyers@chromium.org

Review URL: https://codereview.chromium.org/1090293002

Cr-Commit-Position: refs/heads/master@{#325727}

[modify] http://crrev.com/9dd425b727e5635d29b47010ab5f119e89a5143a/AUTHORS

Comment 8 by rbyers@chromium.org, Apr 27 2015

Labels: Hotlist-Input-Dev

Comment 9 by rbyers@chromium.org, Apr 28 2015

Labels: -Hotlist-InputDev

Comment 10 by bugdroid1@chromium.org, Jun 12 2015

Project Member
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=196987

------------------------------------------------------------------
r196987 | kirk.shoop@microsoft.com | 2015-06-12T01:02:10.070758Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/range/slider-zoomed.html?r1=196987&r2=196986&pathrev=196987
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/dispatch-synthetic-mouseevent-no-action-expected.txt?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/events/EventDispatcher.cpp?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/select-list-box-mouse-focus.html?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/events/MouseEvent.cpp?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash.html?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/PlatformMouseEvent.h?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/events/MouseEvent.h?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/Node.cpp?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/plugins/user-gesture.html?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/select-list-box-mouse-focus-expected.txt?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/Node.h?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash-expected.txt?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/range/slider-transformed.html?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/input/EventHandler.cpp?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/plugins/user-gesture-expected.txt?r1=196987&r2=196986&pathrev=196987
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/dispatch-synthetic-mouseevent-no-action.html?r1=196987&r2=196986&pathrev=196987
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/listbox-onchange.html?r1=196987&r2=196986&pathrev=196987

Don't invoke default actions for MouseEvents generated by script (other than "click") 

Brings blink in-line with the DOM events spec and behavior of IE and Firefox.

BUG= 423975 
R=rbyers@chromium.org

Review URL: https://codereview.chromium.org/894913002
-----------------------------------------------------------------

Comment 11 by bugdroid1@chromium.org, Jun 12 2015

Project Member
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=197020

------------------------------------------------------------------
r197020 | haraken@chromium.org | 2015-06-12T09:05:03.449773Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/input/EventHandler.cpp?r1=197020&r2=197019&pathrev=197020
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/dispatch-synthetic-mouseevent-no-action.html?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/plugins/user-gesture-expected.txt?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/listbox-onchange.html?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/range/slider-zoomed.html?r1=197020&r2=197019&pathrev=197020
   D http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/dispatch-synthetic-mouseevent-no-action-expected.txt?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/events/EventDispatcher.cpp?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/select-list-box-mouse-focus.html?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/events/MouseEvent.cpp?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash.html?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/PlatformMouseEvent.h?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/events/MouseEvent.h?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/Node.cpp?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/plugins/user-gesture.html?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/select-list-box-mouse-focus-expected.txt?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/Node.h?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash-expected.txt?r1=197020&r2=197019&pathrev=197020
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/forms/range/slider-transformed.html?r1=197020&r2=197019&pathrev=197020

Revert 196987 "Don't invoke default actions for MouseEvents gene..."

content_browsertets's DumpAccessibilityEventsTest.AccessibilityEventsMenuListPopup is failing on win platforms.

> Don't invoke default actions for MouseEvents generated by script (other than "click") 
> 
> Brings blink in-line with the DOM events spec and behavior of IE and Firefox.
> 
> BUG= 423975 
> R=rbyers@chromium.org
> 
> Review URL: https://codereview.chromium.org/894913002

TBR=kirk.shoop@microsoft.com

Review URL: https://codereview.chromium.org/1184693003
-----------------------------------------------------------------

Comment 12 by rbyers@chromium.org, Jun 22 2015

Blocking: chromium:334015

Comment 13 by dtapu...@chromium.org, Aug 13 2015

Blockedon: chromium:520519

Comment 14 by dtapu...@chromium.org, Aug 13 2015

Blocking: -chromium:334015

Comment 15 by rbyers@chromium.org, Aug 17 2015

Owner: dtapu...@chromium.org
Status: Assigned

Comment 16 by rbyers@chromium.org, Aug 28 2015

Blockedon: chromium:520520
Labels: Hotlist-Interop
Note that this is blocked on  issue 520520 .  If we can get consensus between some vendors on a simple API for this, then we can make this Pri-1.

Comment 17 by bbri...@microsoft.com, Aug 28 2015

Cc: bbri...@microsoft.com
cc bbrinza@microsoft.com

Comment 18 by tkent@chromium.org, Feb 19 2016

Components: -Blink>Forms

Comment 19 by tkent@chromium.org, Apr 27 2016

Cc: raymes@chromium.org tkent@chromium.org jochen@chromium.org
 Issue 607041  has been merged into this issue.

Comment 20 by raymes@chromium.org, Apr 27 2016

Blocking: 565760

Comment 21 by tkent@chromium.org, May 2 2016

Cc: dtapu...@chromium.org
Owner: tkent@chromium.org
Status: Started (was: Assigned)

Comment 22 by rbyers@chromium.org, May 2 2016

Here's some links to people talking about exploiting this behavior to achieve the UI they want:

http://stackoverflow.com/a/20906852/1102201
http://fiddlesalad.com/javascript/open-select-programmatically/
https://www.codeschool.com/discuss/t/open-select-box-using-jquery-on-a-mouse-event-that-happened-on-another-element/4841

This suggests we need to be thoughtful about providing an alternative and migration path ( issue 520520 ) before fixing this bug.

Comment 23 by tkent@chromium.org, May 8 2016

Owner: dtapu...@chromium.org
Status: Assigned (was: Started)

Comment 24 by raymes@chromium.org, May 9 2016

I suggested in  issue 565760  that even before we resolve  issue 520520  by implementing a new API, we could possibly still require that this event be triggered by a certain user gesture (e.g. click).

Comment 25 by bugdroid1@chromium.org, Jun 22 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/887e8fba784c801afbda06799a99284421408ff1

commit 887e8fba784c801afbda06799a99284421408ff1
Author: dtapuska <dtapuska@chromium.org>
Date: Wed Jun 22 23:40:18 2016

Enable do not allow default action for untrusted events.

Approved intent to ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/WEMnlVIbe70/i2MJcEtNBgAJ

BUG= 565760 , 423975 , 520519 

Review-Url: https://codereview.chromium.org/2070053004
Cr-Commit-Position: refs/heads/master@{#401463}

[modify] https://crrev.com/887e8fba784c801afbda06799a99284421408ff1/third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation
[modify] https://crrev.com/887e8fba784c801afbda06799a99284421408ff1/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls
[modify] https://crrev.com/887e8fba784c801afbda06799a99284421408ff1/third_party/WebKit/LayoutTests/NeverFixTests
[modify] https://crrev.com/887e8fba784c801afbda06799a99284421408ff1/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/887e8fba784c801afbda06799a99284421408ff1/third_party/WebKit/LayoutTests/VirtualTestSuites
[modify] https://crrev.com/887e8fba784c801afbda06799a99284421408ff1/third_party/WebKit/LayoutTests/fast/events/dispatch-synthetic-keyboardevent-no-action-expected.txt
[delete] https://crrev.com/b2b31390d6845f42b5966f854e90f69ff39705e0/third_party/WebKit/LayoutTests/fast/events/simulated-key-state-expected.txt
[delete] https://crrev.com/b2b31390d6845f42b5966f854e90f69ff39705e0/third_party/WebKit/LayoutTests/fast/events/simulated-key-state.html
[modify] https://crrev.com/887e8fba784c801afbda06799a99284421408ff1/third_party/WebKit/LayoutTests/plugins/user-gesture-expected.txt
[modify] https://crrev.com/887e8fba784c801afbda06799a99284421408ff1/third_party/WebKit/LayoutTests/plugins/user-gesture.html
[delete] https://crrev.com/b2b31390d6845f42b5966f854e90f69ff39705e0/third_party/WebKit/LayoutTests/virtual/trustedeventsdefaultaction/fast/events/README.txt
[delete] https://crrev.com/b2b31390d6845f42b5966f854e90f69ff39705e0/third_party/WebKit/LayoutTests/virtual/trustedeventsdefaultaction/fast/events/dispatch-synthetic-keyboardevent-no-action-expected.txt
[delete] https://crrev.com/b2b31390d6845f42b5966f854e90f69ff39705e0/third_party/WebKit/LayoutTests/virtual/trustedeventsdefaultaction/fast/events/simulated-key-state-expected.txt
[delete] https://crrev.com/b2b31390d6845f42b5966f854e90f69ff39705e0/third_party/WebKit/LayoutTests/virtual/trustedeventsdefaultaction/fast/events/stop-load-in-unload-handler-using-window-stop-expected.txt
[modify] https://crrev.com/887e8fba784c801afbda06799a99284421408ff1/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in

Comment 26 by dtapu...@chromium.org, Jun 23 2016

Status: Fixed (was: Assigned)

Sign in to add a comment