Skip to content

Unable to change scroll position programmatically in some cases and weird behavior in RichEditBox inside ScrollViewer #2415

@soumyamahunt

Description

@soumyamahunt

Describe the bug
Here is a pull request to a simple text editor app in which I implement changing scroller position from scrollbar context menu. However the view is reset when app comes into focus. Changes have been made to change scroller position after RichEditBox comes into focus which makes it work for vertical scrollbar but for horizontal scrollbar it doesn't work.

Also, after RichEditBox comes into focus, if you click on any of the text and move your mouse, it will select from there acting like you are doing mouse left click + text selection.

Steps to reproduce the bug
Steps to reproduce the behavior:

  1. Clone this repo.
  2. Switch to "scroll-enhancement" branch.
  3. Build and launch the app.
  4. Right click on horizontal scrollbar and choose a position for scroller.
  5. Click anywhere inside the editor and move/hover the pointer.

Expected behavior
Scroll position should change and selection should work normally.

Screenshots

Version Info

NuGet package version: not applicable

Windows 10 version Saw the problem?
Insider Build (19608) Yes
November 2019 Update (18363) Yes
May 2019 Update (18362) Yes
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Mobile
Xbox
Surface Hub
IoT

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions