Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dataTransfer is null #36276

Open
rahulbansal16 opened this issue Oct 9, 2024 · 1 comment
Open

dataTransfer is null #36276

rahulbansal16 opened this issue Oct 9, 2024 · 1 comment
Labels
Content:WebAPI Web API docs help wanted If you know something about this topic, we would love your help!

Comments

@rahulbansal16
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/InputEvent/dataTransfer

What specific section or headline is this issue about?

Code example given below

What information was incorrect, unhelpful, or incomplete?

In the code example, it is mentioned that if I try to paste some text inside the content editable div, the result div just below the content editable div will access the data transfer object, get that content, and display it.

However, running the example doesn't show any output in the result. Instead, there is an error saying "unable to read getData of null," basically indicating that the data transfer object is null.

What did you expect to see?

By the example, whatever I have pasted inside the content editable div should be displayed in the result div.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@rahulbansal16 rahulbansal16 added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Oct 9, 2024
@github-actions github-actions bot added the Content:WebAPI Web API docs label Oct 9, 2024
@Josh-Cena Josh-Cena added help wanted If you know something about this topic, we would love your help! and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Oct 9, 2024
@Josh-Cena Josh-Cena changed the title The example not working dataTransfer is null Oct 9, 2024
@wbamberg
Copy link
Collaborator

This works for me in Firefox and Safari, but not in Chrome. I don't know why though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs help wanted If you know something about this topic, we would love your help!
Projects
None yet
3 participants