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.
,
May 12 2016
,
May 12 2016
May have security implications.
,
May 12 2016
,
May 13 2016
,
May 30 2016
,
Jun 24 2016
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?
,
Jul 11 2017
,
Mar 19 2018
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 |
|||||||||
Comment 1 by rhys.how...@gmail.com
, May 12 2016