Bug 120920 - Element [draggable=true] does not start dragging when window in background
Summary: Element [draggable=true] does not start dragging when window in background
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Nobody
URL:
Keywords: EasyFix, HTML5
Depends on:
Blocks:
 
Reported: 2013-09-06 21:47 PDT by danya.postfactum
Modified: 2013-09-24 03:49 PDT (History)
3 users (show)

See Also:


Attachments
Test Case (666 bytes, text/html)
2013-09-06 21:51 PDT, danya.postfactum
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description danya.postfactum 2013-09-06 21:47:49 PDT
Steps to reproduce the problem:
1. Open attached HTML file.
2. Switch to another any window (eg. open Notepad or Calc)
3. Press left mouse button on red square in the background (not focused) window, hold during 100ms (or more), then start moving your mouse.

What is the expected behavior?
Red square get dragged (HTML5 drag'n'drop).

What went wrong?
Red square is not draggable.

Did this work before? N/A 

OS Version: 6.1 (Windows 7, Windows Server 2008 R2)

This bugs occurs only when "draggable" attribute is set by setTimeout (with timeout > 10ms).
If window, you switched from, has feature "Always stay on Top", the bug does not happen.
This is Windows OS only related.

I'm working on implemementing text Drag'n'Drop (native) feature in web-based code editor (http://ace.ajax.org/). It has feature "drag delay" (Mac users should know this feature), that's why I need to set [draggable] in setTimeout.

Can anyone give me any clue why this behavior relays on timeout for setTimeout and "Always stay on Top" feature of a second window?
Comment 1 danya.postfactum 2013-09-06 21:51:20 PDT
Created attachment 210837 [details]
Test Case
Comment 2 danya.postfactum 2013-09-07 03:34:55 PDT
This bug is not reproducible when you switch from such windows as Task Manager, Screen Keyboard, or when you focused on Desktop.

I tested this on Linux. It seems to work fine. I did not test it on Mac, but I guess it would work fine too.
So this is Windows only bug (tested on Windows7)
Comment 3 Zan Dobersek 2013-09-24 03:49:20 PDT
Are you using Chromium?