question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Draftail editor crashes on paste - Firefox settings

See original GitHub issue

Issue Summary

The Draftail editor disappears when I try to paste some text in a new page.

Steps to Reproduce

From the Wagtail’s admin:

  1. Create a new page which has at least one RichTextField
  2. Paste some text in this field, it doesn’t matter the source - e.g. enriched text from LibreOffice or simple text from a notepad.

Note that when I edit a page with some content already defined in this field, I do not encounter this bug: I can paste some text without any issue - except some formatting issues, but it is another topic!

Technical details

  • Python version: 3.5.3
  • Django version: 2.0.2
  • Wagtail version: 2.0
  • Browser version: Firefox ESR 52.6.0

Here is the error I have in the Firefox console when I paste some text:

> DOMException [NotFoundError: "Node was not found"
code: 8
nsresult: 0x80530008
location: http://localhost:8090/static/wagtailadmin/js/vendor.js:1]  vendor.js:1:144547
> NotFoundError: Node was not found  vendor.js:1

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jeromelebleucommented, Mar 13, 2018

Nice! We all learned something, so that time was well spent. I’ve added a note in the Draftail docs about troubleshooting this, and will leave it at that for now.

Yes, indeed! Thanks for the note.

I had a deeper look into why this setting was false - by the way, it was from the Parabola iceweasel package, a fully Free (as in freedom) operating system, not Debian. I found several pages which are talking about disabling this setting in Firefox to enforce privacy - see here or here.

1reaction
jeromelebleucommented, Mar 11, 2018

@thibaudcolas, you’re welcome! I totally understand that testing all browsers - and all versions! - and trying to make it works with all of them is quite painful…

I am running Debian Buster (testing) and it works indeed with other browsers. I tried with Firefox 58.0.1 and Chromium 62.0.3202.89. It seems to be specific to Firefox ESR version only so.

Finally you mention some formatting issues — could you give more details? The Draftail editor is fairly new so it would be good to know where things break down.

I did not encountered those formatting issues while testing with those browsers - I did not encountered any issue in fact!

Let me know if you need further details. Also, let me know if I should open a bug report on the Draftail repository instead. For now I’ve switched back to the Hallo editor which doesn’t have this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - Draftail
In Firefox, the dom.event.clipboardevents.enabled setting must be turned on, otherwise the editor will crash on copy-paste.
Read more >
Crash when copying and pasting : r/firefox - Reddit
Hi Is anyone else experiencing intermittent crashes when selecting text or copying? It only happens when hardware acceleration is enabled so ...
Read more >
Copy and paste cause thunderbird crash every time. OK with ...
Another strange thing : I've thunderbird open. I go to another application , an editor or something other and press "CTRL + C"...
Read more >
draftail | Yarn - Package Manager
Lots of them! Paste from Word. Or any other editor. It just works. Autolists – start a line with - , * ,...
Read more >
Wagtail 2.2 release notes
... Django for Wagtail) to contain all current settings options (Matt Westcott, ... Copy-paste between Draftail editors now preserves all formatting/content ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found