Closed
Bug 506081
Opened 15 years ago
Closed 15 years ago
dataTransfer.setData makes scrollbars draggable off of themselves on dragstart events
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
People
(Reporter: sephr, Assigned: smaug)
References
Details
(Keywords: regression)
Attachments
(4 files)
14.30 KB,
text/html
|
Details | |
1.43 KB,
patch
|
Details | Diff | Splinter Review | |
1.29 KB,
patch
|
enndeakin
:
review+
neil
:
superreview+
|
Details | Diff | Splinter Review |
1.23 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US-Hixie; rv:1.9.1.2pre) Gecko/20090723 Shiretoko/3.5.2pre Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US-Hixie; rv:1.9.1.2pre) Gecko/20090723 Shiretoko/3.5.2pre Scrollbars (and every part of their UI) become draggable akin the effect seen in bug 24024 when dataTransfer.setData is used in a dragstart event that was fired on a scrollbar. This bug affects any website that uses the CiteDrag JavaScript library ( http://github.com/eligrey/CiteDrag/tree/master ), which includes my blog. Reproducible: Always Steps to Reproduce: 1. document.addEventListener("dragstart", function(e) {e.dataTransfer.setData("text/vnd.initech.foobar","")}, false) 2. Drag a part of a scrollbar UI Actual Results: Scrollbar UI part is dragged off itself (copied, not removed). Expected Results: Scrollbar UI part functions normally. Side-question: Are scrollbars part of the DOM?
Reporter | ||
Comment 1•15 years ago
|
||
Reporter | ||
Updated•15 years ago
|
Component: General → DOM: Events
Version: unspecified → Trunk
Reporter | ||
Comment 2•15 years ago
|
||
I copied and pasted the wrong bug ID. When I said bug 24024 I meant bug 324024.
Comment 3•15 years ago
|
||
Olli, would it be ok if I added a PreventDefault in nsSliderFrame::MouseDown, or would that break something?
Assignee: nobody → highmind63
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 4•15 years ago
|
||
(In reply to comment #3) > Olli, would it be ok if I added a PreventDefault in nsSliderFrame::MouseDown, > or would that break something? Why would you want to do that? Dragging non-native-anonymous scrollbars should be probably possible. So perhaps better would be to prevent default handling for native anonymous scroll bars. So add something to nsXULElement::PreHandleEvent. Hopefully preventing and cancelling dragstart should be enough. FYI, I can't always reproduce the problem.
Assignee | ||
Comment 5•15 years ago
|
||
(In reply to comment #4) > Hopefully preventing and cancelling dragstart should be enough. Or something like that. I'm not quite sure what this bug is about, because I can't really reproduce it easily (Linux/OSX)
Assignee | ||
Comment 6•15 years ago
|
||
Ok, now I can reproduce
Assignee | ||
Comment 7•15 years ago
|
||
We probably don't want to stop the propagation of all drag events, but anyway this seems to fix this bug.
Assignee | ||
Comment 8•15 years ago
|
||
Enn, what do you think about this. This way if dragging starts in a native anon scroll bar, and nothing is set to be drag data, we don't really start drag process since InvokeDragSessionXXX doesn't get called.
Assignee: highmind63 → Olli.Pettay
Attachment #390465 -
Flags: review?(enndeakin)
Updated•15 years ago
|
Attachment #390465 -
Flags: review?(enndeakin) → review+
Assignee | ||
Updated•15 years ago
|
Attachment #390465 -
Flags: superreview?(neil)
Comment 9•15 years ago
|
||
Comment on attachment 390465 [details] [diff] [review] patch >+ aVisitor.mEvent->message == NS_CONTEXTMENU || >+ aVisitor.mEvent->message == NS_CONTEXTMENU || You're just double-checking that we don't open context menus on scrollbars, right? ;-)
Attachment #390465 -
Flags: superreview?(neil) → superreview+
Assignee | ||
Comment 10•15 years ago
|
||
Uh, how did I do that o_O
Assignee | ||
Comment 11•15 years ago
|
||
Assignee | ||
Comment 12•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/682ac215c2e2
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 13•15 years ago
|
||
Olli: do you think this can (and should) go into 1.9.1.x?
blocking1.9.1: --- → ?
status1.9.1:
--- → ?
Comment 15•15 years ago
|
||
What bug regressed this?
Comment 16•15 years ago
|
||
Regression range: 2008-08-27 works 2008-08-28 broken Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2008-08-27&enddate=2008-08-28 ->Bug 356295 probably. The other drag crash bug was fixed on 1.9.0 and it still doesn't exhibit this bugs behavior.
Blocks: 356295
Comment 17•15 years ago
|
||
Olli: Is this worth fixing on 1.9.1? I don't think it blocks anyway, but if you think we should take it, please give it an approval1.9.1.4 request.
blocking1.9.1: ? → -
You need to log in
before you can comment on or make changes to this bug.
Description
•