Range is Null or Not Collapsed Error Thrown When User Attempts to Add a Second Inline Task Without Clearing the Task Helper Text

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When editing an article, if you highlight something and then start typing (replacing that character or set of characters with something else), you get a Javascript error. We had this problem on version 4.2.13, and after upgrading to version 4.3.

The Javascript error is "range is null or not collapsed"

Cause

It is caused when you select content and type Enter. There's a Char 13 handler triggered on keypress, where getTextFromPreviousSiblingTextNodes(range) doesn't expect the range to select several characters (it expects a caret).

Affected Browsers:

  • Chrome
  • IE
  • Mozilla
    Affects version:
  • 5.0
  • 4.3
  • 4.2

 

Resolution

This was fixed in Version 4.3.7 of Confluence, and the bug report follows as CONFDEV-10170 - Getting issue details... STATUS
Last modified on Feb 26, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.