New issue
Advanced search Search tips

Issue 742054 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 686136
Owner: ----
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Wrong client coordinates in dragend event in front of iframe.

Reported by klesto...@gmail.com, Jul 13 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.50 Safari/537.36

Steps to reproduce the problem:
1. Open attached file and open Console.
2. Try to draganddrop 'drag me' panel in any direction, in any distance, on any place.
3. In Console, you will see 'client coords diff' and 'screen coords diff'. They show how far you moved panel. They are equal, so next line 'diff of diffs' shows zeroes.
4. Press 'Show div' button and repeat steps 2 and 3 but do draganddrop in front of div. Results are the same and are still good: 'client coords diff' and 'screen coords diff' show equal values so their difference is zero.
5. Reload page(optionally), press 'Show iframe' button and repeat steps 2 and 3 but do draganddrop in front of iframe. Now something bad happens. Client and screen coordinates are different and 'diff of diffs' shows {x: 60, y: 50}. This happens when you drop not close to drag start point, but in some distance. Why 60 and 50? 60 is 'body margin' + 'iframe border' + 'iframe left margin' = 8 + 2 + 50 = 60. 50 is 'body margin' + 'iframe border' + 'iframe top margin' = 8 + 2 + 40 = 50.

What is the expected behavior?
dragend event must have correct clientX and clientY coordinates in front of any element. Like screenX and screenY coordinates, they are correct.

What went wrong?
dragend event has wrong clientX and clientY coordinates when in front of iframe. Wrong coordinates, somehow, are affected by position of this iframe.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 60.0.3112.50  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 26.0 r0

If you drop close to drag start point, everything is good, so maybe bug happens only if you drop to more then 50(60) pixels far?

You can also press 'Show more strange iframe' button and observe more weird behavior.
 
draganddrop over iframe fail.html
3.4 KB View Download

Comment 1 by hayato@chromium.org, Jul 13 2017

Components: -Blink>DOM Blink>Input
Blink > Input might be better.
Cc: nzolghadr@chromium.org
Components: Blink>DataTransfer
This sounds like a duplicate of issue 686136

nzolghadr@ do you agree?
Mergedinto: 686136
Status: Duplicate (was: Unconfirmed)
It sounds like it.

Sign in to add a comment