support
support copied to clipboard
[Edit][Firefox] Error. Selection.getRangeAt: 0 is out of range.
I happen to be using Firefox 100.0.1 and version 1.9 of the extension. The are some places where when I use the side-bar or context-menu to apply a BBC Code or HTML style to something I've highlighted I'll get this error dialog.

It does apply the changes to the text so that part still works. I just get this dialog on the bottom-right. One place this happens at is https://www.dslreports.com/forum/mozilla .
Other places I don't get error dialog.
Thanks, Mark H.
Thank you for the report. The mentioned URL requires login to test. I will try to find out the reason.
Thanks for looking at it. I'm trying to find something else that you don't need an account for.
Thought I would mention that it also happens on Reddit. Note: I am still using the old style Reddit. My option to use the new Reddit is still unchecked.
I am not registered at Reddit either.
I found out the reason. I was trying it on google translate page and it happened. It happens when they are more than one frames (i.e. iframe) and the error comes from the other iframes.
I will see how I can eliminate the notice.
PS. I am traveling now and not at my usual location.
Ahhh.. well, you being able to duplicate it is the first step. Have fun with your travels. :)
I also get this message probably every time I use Edit
There was an error with the operation Error: Selection.getRangeAt: 0 is out of range
However, by issuing this error message, the Edit add-on is doing what it is supposed to do. I don't use the sidebar, but only the context menu and keyboard.
Mozilla Firefox 127.0b7 (64-bit) Edit 1.9 (January 17, 2023) Microsoft Windows 10.0.19045.4412
Which pages are you trying it on? Some pages wont allow the operation due to the CSP (Content Security Policy).
However, above issue with CSP should be fixed in Firefox 128. ref: CSP 'sandbox' directive prevents content scripts from matching, due to unique origin, breaking also browser features
Which pages are you trying it on?
In this case - CS-Cart CMS. Also, I can reproduce this error on the sites keep.google.com, calendar.google.com, messages.google.com, mail.google.com, mail.proton.me...
On Github, when performing the same actions, the error message does not appear.