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.

Mention Plugin example throws DOMException

See original GitHub issue

Environment

Description

We tried upgrading our plugins to 4.0.0 and found that the mention plugin is throwing various exceptions when we try to delete the trigger character (or all the characters).

We figured out the same also happens on the examples for the mention plugin. (https://www.draft-js-plugins.com/plugin/mention)

Below are a few of the different exceptions we can get on the samples page. image

react_devtools_backend.js:2430 DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
    at vo (https://www.draft-js-plugins.com/_next/static/chunks/framework.146c8bd33061333d4954.js:6080:19)
    at ku (https://www.draft-js-plugins.com/_next/static/chunks/framework.146c8bd33061333d4954.js:6987:21)
    at t.unstable_runWithPriority (https://www.draft-js-plugins.com/_next/static/chunks/framework.146c8bd33061333d4954.js:717:20)
    at $l (https://www.draft-js-plugins.com/_next/static/chunks/framework.146c8bd33061333d4954.js:3471:29)
    at wu (https://www.draft-js-plugins.com/_next/static/chunks/framework.146c8bd33061333d4954.js:6850:16)
    at ou (https://www.draft-js-plugins.com/_next/static/chunks/framework.146c8bd33061333d4954.js:6585:13)
    at https://www.draft-js-plugins.com/_next/static/chunks/framework.146c8bd33061333d4954.js:3496:23
    at t.unstable_runWithPriority (https://www.draft-js-plugins.com/_next/static/chunks/framework.146c8bd33061333d4954.js:717:20)
    at $l (https://www.draft-js-plugins.com/_next/static/chunks/framework.146c8bd33061333d4954.js:3471:29)
    at Xl (https://www.draft-js-plugins.com/_next/static/chunks/framework.146c8bd33061333d4954.js:3492:13)
overrideMethod @ react_devtools_backend.js:2430
ro @ framework.146c8bd33061333d4954.js:5769
i.componentDidCatch.n.callback @ framework.146c8bd33061333d4954.js:6263
hi @ framework.146c8bd33061333d4954.js:3719
uo @ framework.146c8bd33061333d4954.js:5859
ku @ framework.146c8bd33061333d4954.js:7052
t.unstable_runWithPriority @ framework.146c8bd33061333d4954.js:717
$l @ framework.146c8bd33061333d4954.js:3471
wu @ framework.146c8bd33061333d4954.js:6850
ou @ framework.146c8bd33061333d4954.js:6585
(anonymous) @ framework.146c8bd33061333d4954.js:3496
t.unstable_runWithPriority @ framework.146c8bd33061333d4954.js:717
$l @ framework.146c8bd33061333d4954.js:3471
Xl @ framework.146c8bd33061333d4954.js:3492
Yl @ framework.146c8bd33061333d4954.js:3484
F @ framework.146c8bd33061333d4954.js:7906
Xt @ framework.146c8bd33061333d4954.js:2004

Reproducible Demo

  1. Try the first example on the examples page (https://www.draft-js-plugins.com/plugin/mention)
  2. Type in ‘@’ to mention someone.
  3. Select the mention
  4. Delete the mention
  5. Type in ‘@’ followed by a few characters
  6. Delete the mention characters including the ‘@’

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
fxOnecommented, Mar 5, 2021

I can no longer reproduce this error on the current web site. @erdillon @hasandogu can you confirm that?

1reaction
fxOnecommented, Jan 30, 2021

The getIn issue is a draft-js/SSR issue which is already reported here: https://github.com/facebook/draft-js/issues/2121

Read more comments on GitHub >

github_iconTop Results From Across the Web

draftjs - How to get the mentioned users from react draft-js ...
I gone through the documentation of draft-js-mention-plugin but couldn't figure a way to read all the mentions from the content.
Read more >
draft-js-plugins - Bountysource
I'm writing a toolbar with DraftJS, and it will be rendered before the Editor. ... the mention plugin fails to create a mention...
Read more >
Common getUserMedia() Errors - Deconstruct
It's thrown when the constraints object passed to getUserMedia() is empty or has all tracks (audio, video or both) set to false. Firefox...
Read more >
Introduction to using XPath in JavaScript - MDN Web Docs
Note that, if the xpathExpression contains a namespace prefix, this will result in a DOMException being thrown with the code NAMESPACE_ERR .
Read more >
BluetoothDevice - Android Developers
Provided as a convenience for functions that require a sentinel error value, for example: Intent.getIntExtra(BluetoothDevice.
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