[FF] NS_ERROR_FAILURE thrown randomly when setting DOM selection #14493
Labels
browser:firefox
package:engine
squad:collaboration
Issue to be handled by the Collaboration team.
type:bug
This issue reports a buggy (incorrect) behavior.
Milestone
📝 Provide detailed reproduction steps (if any)
We had problems with
NS_ERROR_FAILURE
thrown on random occasions, some of them seems fixed (closed issues in this repository), and at least one error is not closed (https://github.com/cksource/collaboration-features/issues/4183).When testing multi-root editor in RTC environment, this happened again, this time, when removing the last root and performing undo. It seems to not be 100%, but it mostly throws when you do it right. It is an edge case but that's not entirely the point.
The point is that the error is not described and it is hard to find any information about when it would be thrown.
The error is thrown in
renderer.ts
in_updateDomSelection
:I checked and
anchor
andfocus
are set correctly. The DOM elements have same owner document and it is the same as the selection. Everything seems right.One suggestion I did find when looking for the solution is to use
setBaseAndExtent
instead. After using it, I wasn't able to reproduce this problem anymore.Maybe we will be able to fix random FF bugs this way?
The text was updated successfully, but these errors were encountered: