Trumbowyg icon indicating copy to clipboard operation
Trumbowyg copied to clipboard

Shaky crash issue: TypeError: Range.setEnd: Argument 1 does not implement interface Node.

Open scscgit opened this issue 3 years ago • 0 comments

I observed issue of Trumbowyg crashing the page despite latest version https://github.com/Alex-D/Trumbowyg/releases/tag/v2.25.1, which had supposedly fixed an issue https://github.com/Alex-D/Trumbowyg/issues/1233 (fixed in https://github.com/Alex-D/Trumbowyg/commit/5ad49f30e31cc9a543f9dfc7c1d9a33bd6c3bae5) that seems to be related based on the error message (TypeError: Range.setEnd: Argument 1 does not implement interface Node.). As the fix replaced t.range.startContainer.parentNode by t.range, I suspect that a similar check needs to be performed at https://github.com/Alex-D/Trumbowyg/blob/fd304a39433b5918291824bfe961bb54d60bfc29/src/trumbowyg.js#L1831

Note that I'm unable to reproduce this intentionally, and I don't have any debugging setup in place to discover the conditions or root cause. This doesn't usually occur (but it's fatal when it does, causing a motivation to wrap this component in some Vue error boundary - too bad https://github.com/ankurk91/vue-trumbowyg is archived so it can't be done there). I currently don't have any more information except the following screenshot(s):

image

It has occurred again, so at least I confirmed some variables in debugger:

image

Description

  • Microsoft Windows 10 Enterprise
  • Firefox 91.0.1 (64-bit)

scscgit avatar Aug 23 '21 12:08 scscgit