Skip to content

When switching back to program using "alt+tab", the focus will incorrectly scroll back to the position of cursor #3890

Closed

Description

@lyoh33

Description

When switching back to program using "alt+tab", the focus will incorrectly scroll back to the position of cursor

  • Can you reproduce the issue?
  • no

Steps to reproduce

  1. make sure you have enough lines so that you can scroll down the screen
  2. move the cursor to a lower line, and then scroll up until the cursor is out of screen
  3. switch out and then back again, it will scroll down automatically, so the cursor ends up at the bottom of the screen
  4. but if you move the cursor to a uppper line in step2, and do the reverse action, it won't scroll up by itself.

Expected behavior:

No matter where my cursor is, there should be no automatic scrolling when I switch back to the program. The screen focus should always remain where it was when I last switched out of the program.

Actual behavior:

when the cursor in a lower line, it will scroll automaticly. However, when it in a upper line, it don't happen.

Link to an example: [optional]

Versions

  • MarkText version: 0.17.1
  • Operating system: win11

Activity

  1. travispulley commented on May 6, 2025

    @travispulley

    I found this issue seeing if anyone else has it. I can reproduce this consistently by holding down alt while scrolling then releasing alt. Another way to trigger it is by using volume up/down media keys, perhaps other media keys too I haven't tried.

    I use a AHK macro to amplify scrolling when I hold down alt, so this makes MarkText nigh unusable for me. I just started yesterday, so I'm interested to see if a fix is possible because otherwise it's a nice MD editor/viewer

  2. agbeaton commented on Dec 29, 2025

    @agbeaton

    I'm just having issues with it suddenly scrolling to the bottom while I'm editing near the top of the document.

  3. added
    🐛 bug
    🪲 pri/major
    on May 13, 2026
  4. Jocs commented on May 18, 2026

    @Jocs
    Member

    I can not reproduce this on develop branch now, and close it, feel free to reopen it when you still have issue on develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🪲 pri/major🐛 bug🔭 area/editor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions