Closed
Bug 978291
Opened 11 years ago
Closed 11 years ago
about:downloads can't handle drag events if downloads list is empty
Categories
(Firefox :: Downloads Panel, defect)
Tracking
()
VERIFIED
FIXED
Firefox 30
People
(Reporter: jakub.g.opensource, Assigned: alice0775)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140212131424
Steps to reproduce:
Wanted to drag'n'drop an image to the downloads list displayed in an addon via `about:addons` page, in order to initiate the download. The downloads list was empty.
Actual results:
Nothing happened.
Expected results:
A file download should have started.
I've found this issue inside the All-in-One Sidebar addon, and it lead to an issue in `about:downloads` page in the core.
(tested with Firefox 27 and AiOS 0.7.21)
https://github.com/AddonLab/AiOS/issues/31
When you try to drag'n'drop some files into the "downloads" panel of AiOS, it works and files are correctly downloaded. However this only works if there were already some files on the downloads list. If there were none, the panel displays "There are no downloads" and you can't drag'n'drop anything over there to initiate a new download.
AiOS uses the `about:downloads` URI to display this panel.
When you open `about:downloads` in Firefox and inspect it with Firebug when there are some downloads, you'll see that each of the downloads is an item of a <richlistbox>. The "There are no downloads" text is a <description id="downloadsListEmptyDescription"> node.
Related CSS:
https://github.com/mozilla/gecko-dev/blob/master/browser/components/downloads/content/contentAreaDownloadsView.css
tells that if there are some downloads, the latter node is hidden, otherwise, if there are none, it is displayed.
In the latter case, due to the fact that <richlistbox> has no children the #downloadsListEmptyDescription takes 100% width and height.
Those two nodes are siblings and only <richlistbox> has ondrag/ondrop handlers.
Hence if the downloads list is empty, there's no element capable of intercepting drag/drop events.
Here's a commit that might solve this issue
https://github.com/jakub-g/gecko-dev/commit/cb2f477ef56264c2a4f10e3571f16a0886c07bd9
I haven't built/tested this but I think the fix should go somewhere along those lines.
Assignee | ||
Comment 3•11 years ago
|
||
#downloadsListEmptyDescription should not be the target of mouse events
Assignee: nobody → alice0775
Assignee | ||
Updated•11 years ago
|
Assignee: alice0775 → nobody
Blocks: 824265
Status: UNCONFIRMED → NEW
status-firefox27:
--- → affected
status-firefox28:
--- → affected
status-firefox29:
--- → affected
status-firefox30:
--- → affected
Ever confirmed: true
Comment 4•11 years ago
|
||
Attachment #8384080 -
Flags: review?(mak77)
Comment 5•11 years ago
|
||
Comment on attachment 8384080 [details] [diff] [review]
bug978291.patch
conceptually it's correct, though I'd prefer a patch setting mousethrough="always" on downloadsListEmptyDescription
Attachment #8384080 -
Flags: review?(mak77) → feedback+
Comment 6•11 years ago
|
||
Are you willing to provide such a patch by chance?
Flags: needinfo?(alice0775)
Assignee | ||
Comment 7•11 years ago
|
||
#downloadsListEmptyDescription will not receive any mouse events
Attachment #8384080 -
Attachment is obsolete: true
Flags: needinfo?(alice0775)
Comment 8•11 years ago
|
||
Comment on attachment 8387644 [details] [diff] [review]
bug978291.patch_v2
Review of attachment 8387644 [details] [diff] [review]:
-----------------------------------------------------------------
yep, thanks
please add a checkin comment and checkin-needed!
Attachment #8387644 -
Flags: review+
Assignee | ||
Comment 9•11 years ago
|
||
added checkin comment to the attachment 8387644 [details] [diff] [review]
Attachment #8387644 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Updated•11 years ago
|
Attachment #8387678 -
Attachment is patch: true
Updated•11 years ago
|
Assignee: nobody → alice0775
Status: NEW → ASSIGNED
Comment 10•11 years ago
|
||
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Comment 11•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 30
Reporter | ||
Comment 12•11 years ago
|
||
Verified the fix with today's Nightly 30.0a1 (2014-03-08).
Thanks to everyone involved for quick resolution!
Updated•11 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•