0
Under review

Device Rotation causes incorrect scrolling

Steven Lu 10 years ago in General updated 6 years ago 6
This is mainly an issue with large files.

When device rotation occurs, the page position changes due to many lines becoming wrapped (or unwrapped). This in itself isn't a horrible problem, but what tends to happen is this: 

I am at line 5500, the file is 6200 lines. 

I rotate to portrait. It pegs me at the bottom of the file. This clamps the y-offset.

Now I rotate back to portrait in hopes of returning to line 5500. I am dropped off around line 4000.

This is... not... ideal. 

One great way to fix BOTH issues is to check the line# and return me to that position upon device rotation. 

Note also that having a cursor present will prevent this issue (which is probably why this has not been reported yet). However having a cursor makes over 1/3 of the screen consumed by a keyboard so I *ensure* the keyboard is put away when I use Textastic to read code (as it's hardly practical to do actual coding), but it causes this issue every time (when i am near the bottom of a file).

So since I am JB'd i would use tweaks that let me force specific apps to be portrait-locked, but it's just not ideal because sometimes I do need to go landscape when the line wrapping gets to be overwhelming.
The actual problem is that it takes a while to re-layout the file if you have auto line break enabled.

If you encounter this problem often, you might try to disable auto-line breaks in settings and set a manual line break column. Set it to a high value like 1000 to effectively disable line breaks.

I came here to report the same issue. It's really frustrating. Currently, if viewing the end of a 6000 line file, rotating the device to landscape, and then back again, causes the app to automatically scroll to line 3000. It even happens sometimes when returning to the app, no rotation required. Disabling "Auto Word Wrap" as per Alexander's suggestion does indeed resolve the issue, but now we've lost "Auto Word Wrap". Can't this be fixed properly? Why would a fix be incompatible with the "Auto Word Wrap" feature?

Interesting. i havent used the app much but i have the latest ipad and might want to again at some point. Last time, probably more than a year ago, i tend to find that the instabilities related to global directory search (which, heck, just having that feature is better than nothing, let's be clear though) are more what bugs me than yanking me around due to app orientation... but yeah why was auto word wrap feature removed? If it has indeed been.

I use the app daily. "Auto Word Wrap" was never removed. I simply turned it off in the settings, like Alexander suggested. But this is not a fix. It's a workaround. A fix would be appreciated.

Oh! OK i re-read your comment and it makes sense. Hmm. Yeah having to scroll left and right isnt particularly convenient either.