Describe the bug
Introduced with bf24063
The timeslider cannot display the contents in certain situations and errors, so that timeslider play or backwards/forwards buttons do not work anymore
To Reproduce
Steps to reproduce the behavior:
- Create pad
- Delete everything (ctrl+a, delete)
- Press enter
- goto timeslider, activate "follow pad contents"
- it errors when going from revision 1 to 2, and when going from 1 to 0.
Error is:
timeslider.js?callback=require.define&v=33c0661d:6342 Uncaught TypeError: Cannot read property 'offsetTop' of undefined at goToLineNumber (timeslider.js?callback=require.define&v=33c0661d:6342) at applyChangeset (timeslider.js?callback=require.define&v=33c0661d:6004) at Function.goToRevision (timeslider.js?callback=require.define&v=33c0661d:6099) at Array.goToRevisionIfEnabled (timeslider.js?callback=require.define&v=33c0661d:6309) at _callSliderCallbacks (timeslider.js?callback=require.define&v=33c0661d:6401) at setSliderPosition (timeslider.js?callback=require.define&v=33c0661d:6470) at HTMLButtonElement.<anonymous> (timeslider.js?callback=require.define&v=33c0661d:6693) at HTMLButtonElement.dispatch (ace2_common.js?callback=require.define&v=33c0661d:5492) at HTMLButtonElement.elemData.handle (ace2_common.js?callback=require.define&v=33c0661d:5300)
In the case of revision 1 to 2: in rev 1 the pad contains one line ("\n") and the changeset in rev 2 inserts another one and goToLineNumber will try to go to line 2 and fail.
In the case of revision 1 to 0: in rev 1 the pad contains one line ("\n") and the changeset for 0 will insert 7 lines for the default pad text. goToLineNumber will try to go to line 8 and fail.
Describe the bug
Introduced with bf24063
The timeslider cannot display the contents in certain situations and errors, so that timeslider play or backwards/forwards buttons do not work anymore
To Reproduce
Steps to reproduce the behavior:
Error is:
timeslider.js?callback=require.define&v=33c0661d:6342 Uncaught TypeError: Cannot read property 'offsetTop' of undefined at goToLineNumber (timeslider.js?callback=require.define&v=33c0661d:6342) at applyChangeset (timeslider.js?callback=require.define&v=33c0661d:6004) at Function.goToRevision (timeslider.js?callback=require.define&v=33c0661d:6099) at Array.goToRevisionIfEnabled (timeslider.js?callback=require.define&v=33c0661d:6309) at _callSliderCallbacks (timeslider.js?callback=require.define&v=33c0661d:6401) at setSliderPosition (timeslider.js?callback=require.define&v=33c0661d:6470) at HTMLButtonElement.<anonymous> (timeslider.js?callback=require.define&v=33c0661d:6693) at HTMLButtonElement.dispatch (ace2_common.js?callback=require.define&v=33c0661d:5492) at HTMLButtonElement.elemData.handle (ace2_common.js?callback=require.define&v=33c0661d:5300)In the case of revision 1 to 2: in rev 1 the pad contains one line ("\n") and the changeset in rev 2 inserts another one and goToLineNumber will try to go to line 2 and fail.
In the case of revision 1 to 0: in rev 1 the pad contains one line ("\n") and the changeset for 0 will insert 7 lines for the default pad text. goToLineNumber will try to go to line 8 and fail.