Closed VincentValensky closed 8 months ago
May or may not be the same thing #1338 is describing
I think there is a range of bugs that are all related to the same starting point — editing a long passage with code in it.
Sometimes it manifests as the editor scrolling one line with each character typed, sometimes with the insertion point jumping to a new location, sometimes with the insertion point alternating between the correct position and the end of the passage text.
My suspicion is that all of these are just variants of the same underlying bug, which must be due to the editor, or the code highlighter, being confused as to the correct cursor position, or the matching scroll offset. Since it now seems clear that this happens in every StoryFormat, it must be something underlying to the editor itself.
Some additional notes, after a lot of testing today.
I could not reproduce this behaviour in SugarCube, Snowman, or Chapbook stories, but could reproduce it 100% in Harlowe. In a Harlowe story it was not necessary to have code, html, or syntax highlighting. The only requirements are:
After that, typing anywhere will cause the passage to scroll with each keypress for some number of keypresses. Once the scroll behaviour has stopped, further typing does not cause more scroll until you manually scroll the passage by any amount, at which point the behaviour repeats. This is not true if the scrolling causes new line to move to the bottom of the window, in which case it will continue to jerk up and down by one line for each character typed.
Here is a video capturing this incremental scroll.
https://user-images.githubusercontent.com/4206142/217520005-1237fee3-6c2a-40f5-bd9b-61465b96d0d4.mov
It also seems to be the case that the longer the passage, the more the scroll happens.
@hituro if this is limited to Harlowe only, I'm inclined to close this and ask that you follow up with that project repo. Does that sound OK to you?
@hituro if this is limited to Harlowe only, I'm inclined to close this and ask that you follow up with that project repo. Does that sound OK to you?
It has already been here, closed, opened there, closed, re-opened here ...
I couldn't reproduce on anything but Harlowe, but on the Harlowe issue, people (me?) said they could: https://foss.heptapod.net/games/harlowe/-/issues/295
I have no objection to it being on the right issues list, but having it ping-pong between each isn't superb. In any case, it's not my issue, so I will leave that to @VincentValensky :)
It sounds like this is related to Harlowe's editor extensions. I'll close for now, but if there's something about how Twine is using CodeMirror that is causing this, let's re-open with more info.
Describe the bug.
When editing particularly large and complex passages, the editor exhibits behavior where each letter typed would also cause the passage window to scroll a little bit on its own, creating an unpleasant and disorienting experience.
Steps to reproduce:
I have tested this with large "lorem ipsum" passages, but they don't have this problem. The problem seems to occur under the following conditions:
Please find below a passage that exhibits this behavior. To reproduce, simply paste the entire thing in a new passage, scroll somewhere to the middle of it, and start typing. The passage will scroll on its own while you type.
Expected behavior:
Scroll position should not be affected by typing.
Additional context on this problem.
I have had this problem in other similarly long passages too and can supply them if needed.
Twine version number
2.6.1
Does this problem occur with the web version of Twine or the desktop app?
Desktop app
What operating system does this problem occur on?
Windows
If this problem is occurring with the web version of Twine, what browser does it occur on?
Chrome/Chromium
Presubmission checklist