Closed Bug 1437405 Opened 7 years ago Closed 7 years ago

Drag and Drop of Events in Lightning Calendar doesn't work

Categories

(Calendar :: Calendar Frontend, defect)

Lightning 6.2
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: walts48, Assigned: Fallen)

References

Details

(Keywords: regression)

Attachments

(2 files)

Try dragging and dropping an existing event in Lightning 6.2a1 in Thunderbird Daily 60.0a1. The event does not respond to the mouse actions. What should happen: The user should be able to drag and drop the event from the current date to any other date. Works in Daily 60.0a1 from 2018/02/08 Build ID: 20180208030201 Built from https://hg.mozilla.org/comm-central/rev/a31a998b9f300044a43b3a5870e93737bcd4f6aa Doesn't work in Daily 60.0a1 from 2018/02/09 Build ID: 20180209030201 Built from https://hg.mozilla.org/comm-central/rev/36b19d54366f9cfffff4a33b7ca81c4f21f507de
Status: UNCONFIRMED → NEW
Component: General → Calendar Views
Ever confirmed: true
Keywords: regression
Bug 1424107 added an additional parameter to nsIDragService.invokeDragSession that is used by Lightning: https://dxr.mozilla.org/comm-central/search?q=invokeDragSession Maybe we just need to update the call https://dxr.mozilla.org/comm-central/source/calendar/base/content/calendar-dnd-listener.js#588 Too bad that any error during this call is ignored and not reported.
Depends on: CVE-2018-5181
Attached patch Fix - v1 β€” β€” Splinter Review
Yep, that was it. I added the extra argument and it works again. I also removed the try/catch, when I pressed escape it worked for me. Would be great if someone else could also test that, to make sure it wasn't just one of the edge cases that worked.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #8951894 - Flags: review?(ssitter)
Attachment #8951894 - Flags: review?(ssitter) → review+
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/77fe0ec955ea Adapt involeDragSession to include new principal uri spec argument. r=ssitter
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 6.2
I tested today and I get the following exception when pressing Escape key in month view: > NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) > [nsIDragService.invokeDragSession] calendar-dnd-listener.js:587 Maybe the try/catch has to go back? But maybe with an informational log message about the handled and ignored exception?
Flags: needinfo?(philipp)
Status: RESOLVED → REOPENED
Flags: needinfo?(philipp)
Resolution: FIXED → ---
Attached patch Resurrect the try/catch β€” β€” Splinter Review
Thanks for testing! How is this?
Attachment #8954479 - Flags: review?(ssitter)
Comment on attachment 8954479 [details] [diff] [review] Resurrect the try/catch Review of attachment 8954479 [details] [diff] [review]: ----------------------------------------------------------------- ::: calendar/base/content/calendar-dnd-listener.js @@ +586,5 @@ > aXULBox.sourceObject = aItem; > + try { > + cal.getDragService().invokeDragSession(aXULBox, "", mutArray, null, action); > + } catch (e) { > + if (e.result != Components.results.NS_ERROR_FAILURE) { IMHO this is a very general error, so you might as well ignore all errors here like it was before. The situation would be different if something more specific were returned, like NS_ERROR_ESC_DURING_DRAG.
It is general, but it does mean that there was an error in the xpcom method, as opposed to NS_ERROR_NOT_ENOUGH_ARGS or SyntaxError which would be re-thrown.
Attachment #8954479 - Flags: review?(ssitter) → review+
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/64379e1323a8 Catch useless exception when invoking drag session in the views. r=ssitter
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: