Google Groups

Issue 168544 in chromium: DragEnd event fired when DOM is changed during drag


chro...@googlecode.com Jan 7, 2013 3:10 AM
Posted in group: Chromium-bugs
Status: Unconfirmed
Owner: ----
Labels: Area-UI Pri-2 Via-Wizard Type-Bug OS-Linux

New issue 168544 by lar...@google.com: DragEnd event fired when DOM is  
changed during drag
http://code.google.com/p/chromium/issues/detail?id=168544

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like  
Gecko) Chrome/24.0.1312.45 Safari/537.17

Steps to reproduce the problem:
1. Go to http://en.wikipedia.org/wiki/Google_Chrome
2. Execute this javascript:

var title = document.getElementById("firstHeading");
var toc = document.getElementById("toc");
toc.draggable = "draggable";
toc.ondragstart = function () { console.log("ondragstart");  
title.style.marginTop = Math.round(100*Math.random()) + "px"; }
toc.ondragend = function() { console.log("ondragend"); }

3. Drag the table of contents

What is the expected behavior?
The table of contents is draggable, and the page text moves randomly up or  
down when starting to drag.

What went wrong?
Whenever the page text moves down, the dragend event is fired immediately.

Did this work before? N/A

Chrome version: 24.0.1312.45  Channel: beta
OS Version: 2.6.38.8-gg987

This is a simplified example. My real use case is making a radial menu,  
where I need the menu items to appear on drag start.