Details
-
Bug
-
Resolution: Fixed
-
None
-
Google Chrome
-
Empty show more show less
Description
problem
JS error and wrong trackchanges (see screenshot) on rewriting a segment with a single word.
The track changes are
<del>Startseitea</del><ins>sd</ins>
but should be
<del>Startseite</del><ins>asd</ins>
steps to reproduce
- open a segment which contains only one word
- select the word by double click
- type new text (asd in the screen shot)
trace
rangy-core.js:2304 Uncaught DOMException: Failed to execute 'setEnd' on 'Range': There is no child at offset 4.
at WrappedRange.rangeProto.setEnd (http://translate5.localdev/js/rangy/rangy-master/lib/rangy-core.js:2304:42)
at constructor.getPositionInfoForRange (http://translate5.localdev/modules/editor/js/app/util/Range.js?_dc=1544611956543:377:19)
at constructor.getContainerForCharacterNextToCaret (http://translate5.localdev/modules/editor/js/app/util/Range.js?_dc=1544611956543:174:35)
at constructor.getTrackchangeNodeForContentBeforeCaret (http://translate5.localdev/editor/plugins/js/TrackChanges/controller/UtilRange.js?_dc=1544611957036:220:34)
at constructor.getINSNodeForContentBeforeCaretAccordingToEvent (http://translate5.localdev/editor/plugins/js/TrackChanges/controller/UtilRange.js?_dc=1544611957036:242:34)
at constructor.handleInsert (http://translate5.localdev/editor/plugins/js/TrackChanges/controller/UtilInsertion.js?_dc=1544611957036:111:40)
at constructor.trackChangesInEditor (http://translate5.localdev/editor/plugins/js/TrackChanges/controller/Editor.js?_dc=1544611956448:552:37)
at constructor.handleKeyDown (http://translate5.localdev/editor/plugins/js/TrackChanges/controller/Editor.js?_dc=1544611956448:327:41)
at constructor.fire (http://translate5.localdev/ext-6.2.0/build/ext-all-debug.js:20731:42)
at constructor.fire (http://translate5.localdev/ext-6.2.0/build/ext-all-debug.js:34336:27)