Details
-
Bug
-
Resolution: Fixed
-
None
-
Chrome / Linux / version: current master
-
Empty show more show less
Description
problem
The JS Exception "Uncaught DOMException: Failed to execute 'setEnd' on 'Range': There is no child at offset 4." happens on pasting content into the segment editor.
stack trace
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=1547557550353:377:19)
at constructor.getContainerForCharacterNextToCaret (http://translate5.localdev/modules/editor/js/app/util/Range.js?_dc=1547557550353:174:35)
at constructor.getTrackchangeNodeForContentBeforeCaret (http://translate5.localdev/editor/plugins/js/TrackChanges/controller/UtilRange.js?_dc=1547557550805:220:34)
at constructor.getINSNodeForContentBeforeCaretAccordingToEvent (http://translate5.localdev/editor/plugins/js/TrackChanges/controller/UtilRange.js?_dc=1547557550805:242:34)
at constructor.handleInsert (http://translate5.localdev/editor/plugins/js/TrackChanges/controller/UtilInsertion.js?_dc=1547557550805:111:40)
at constructor.trackChangesInEditor (http://translate5.localdev/editor/plugins/js/TrackChanges/controller/Editor.js?_dc=1547557549748:552:37)
at constructor.handleKeyDown (http://translate5.localdev/editor/plugins/js/TrackChanges/controller/Editor.js?_dc=1547557549748: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)
steps to reproduce
- Copy a text from somewhere
- Open A segment for editing
- Double click the segment content to select all
- press ctrl-v to paste and overwrite the selected content with the copied one
- The content is pasted, the selected old content is wrapped with DEL, but the new content is inserted without INS tags!