New issue
Advanced search Search tips

Issue 611460 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Mouseup event at 0,0 fires if new window opened from click in iframe

Reported by rhys.how...@gmail.com, May 12 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36

Steps to reproduce the problem:
1. Create a webpage with an iframe and a mouseup event listener. 
The mouseup event listener has to listen to an element touching 0,0
2. The iframe webpage has a mousedown event listener which does two things:
   - It calls event.preventDefault() to stop the default action of the mousedown.
   - It creates a new window using window.open('SOME_URL');
3. Click inside of the iframe, opening the new window

What is the expected behavior?
The mouseup event does not fire.

What went wrong?
When the iframe creates this window in a new tab the parent page's mouseup event listener is fired.
That is the bug. Furthermore the mouseup event fires at 0,0

Did this work before? N/A 

Chrome version: 50.0.2661.94  Channel: n/a
OS Version: OS X 10.11.3
Flash Version: Shockwave Flash 21.0 r0

This behavior does not occur in Safari Version 9.1 (11601.5.17.1) or Firefox 37.0.2

I've included two webpages which reproduce the bug, one of them serving as an iframe to the other.
Try it out by opening test.html in chrome and clicking inside of the iframe to see the bug output in console.
 
test.html
267 bytes View Download
iframe.html
287 bytes View Download
Steps to reproduce the problem:
1) Download both files. Open test.html in Chrome and click the text "click inside this box".
2) A new window will be opened. Switch back to original window and observe the following console message "the mouse event inside the iframe should NOT be reaching here - outside the frame". This console message is indicative of the mouse event reaching the parent of the iframe. This should not happen

Comment 2 by le...@chromium.org, May 12 2016

Summary: Mouse event bubbles up through iframe if new window opened from click in iframe (was: Unintended mouseup event firing when a new tab is created inside of an iframe from a mousedown listener with preventDefault)

Comment 3 by le...@chromium.org, May 12 2016

Labels: Security
May have security implications.  
Components: Security Security>UX
Components: -Blink Blink>DOM

Comment 6 by tkent@chromium.org, May 30 2016

Labels: Hotlist-Interop

Comment 7 by tkent@chromium.org, Jun 24 2016

Components: -Security>UX -Security
Labels: -Security
Status: Available (was: Unconfirmed)
Summary: Mouseup event at 0,0 fires if new window opened from click in iframe (was: Mouse event bubbles up through iframe if new window opened from click in iframe)
Confirmed.  I don't think this has security implication because event target is <html> in the main frame.  The event isn't bubbling.

Probably, it's a synthetic mouse event to clear hover/active state?

Comment 8 by hayato@chromium.org, Jul 11 2017

Components: -Blink>DOM Blink>Input

Comment 9 by mustaq@chromium.org, Mar 19 2018

Labels: Hotlist-Input-Dev
Owner: mustaq@chromium.org
Status: WontFix (was: Available)
The mouseup looks like a platform event sent to a window whenever it looses focus.  

For examples, clicking on the main frame then hitting window-switcher key to move the focus away also fires the mouseup.

Sign in to add a comment