Closed Bug 1435451 Opened 6 years ago Closed 6 years ago

Accessing DataTransfer's dropEffect or effectAllowed during dragstart throws "Error: Permission denied to access property"

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: Kwan, Assigned: enndeakin)

References

()

Details

(Keywords: parity-chrome)

Attachments

(2 files)

Attached file Testcase
STR:
1) Open the attached test case
2) Open the web console (Ctrl+Shift+K)
3) Select some text in the textarea
4) Attempt to drag said text to the other textarea

AR:
Three console logs:
the DataTransfer object
"Accessing 'dropEffect' during dragstart threw 'Permission denied to access property "dropEffect"'"
"Accessing 'effectAllowed' during dragstart threw 'Permission denied to access property "effectAllowed"'"

ER:
Three console logs:
the DataTransfer object
"dragstart dropEffect none"
"dragstart effectAllowed uninitialized"

Chrome shows the expected result

Interestingly in Firefox the console log of the DataTransfer object does show the expected none and uninitialized values for the properties.
Component: DOM: Events → Drag and Drop
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Keywords: parity-chrome
Whiteboard: [parity-chrome]
Assignee: nobody → enndeakin
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8989820 - Flags: review?(nika)
Testing shows that this issue only occurs when the drag target is a textarea or input. I suspect that something is thinking that it is in the context of its anonymous content instead of the textarea itself.
Priority: -- → P2
Attachment #8989820 - Flags: review?(nika) → review+
Pushed by neil@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5a285b578fe1
use first non-native anonymous target when setting DataTransfer's parent object, r=nika
https://hg.mozilla.org/mozilla-central/rev/5a285b578fe1
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.