Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MarkdownTextBlock Code Block Scrolling Fix #2093

Merged

Conversation

WilliamABradley
Copy link
Contributor

Added Scroll Hack to return Scrolling Inertia to the Parent ScrollViewer if it exists so that Code Blocks don't steal scroll.

Issue: #1881

PR Type

What kind of change does this PR introduce?

  • Feature

What is the current behavior?

A Code Block ScrollViewer steals the Mouse Scroll Wheel from a Parent ScrollViewer outside of the MarkdownTextBlock, when the mouse cursor is over a Code Block.

What is the new behavior?

Violating fundamental concepts of C# to maintain scrolling inertia and prevent visible jankiness.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes, eh.....

The Usability of the MarkdownTextBlock is improved, but the interaction is different (For the better).

…wer if it exists so that Code Blocks don't steal scroll.
@WilliamABradley WilliamABradley added this to the 3.0 milestone May 14, 2018
@Vijay-Nirmal
Copy link
Contributor

I have opened an issue (#2094) related to MarkdownTextBlock.

Scroll Bar in ScrollViewer is disappearing after a scroll with the mouse wheel

gif

After this PR, We can scroll the code block using mouse wheel when the pointer is above the Scroll Bar area.

gif

As we removed the scroll using mouse wheel feature in this PR, now the only option to scroll is by using scroll buttons. So we should fix that issue ASAP after this PR or in this PR.


Update your branch and do this trick for ScrollViewer in RenderImage

@WilliamABradley
Copy link
Contributor Author

@Vijay-Nirmal I have applied the fix to the Image Scrollviewer too. The scrollbar issue is out of our control (We didn't cause the issue) and will have to be dealt with at another time.

@WilliamABradley
Copy link
Contributor Author

Note @nmetulev, this hasn't been tested with .NET Native (I can't seem to compile in Release for this App, some missing instruction error), this hack might need a Runtime directive.

@nmetulev
Copy link
Contributor

Just tested it with a blank app in release mode and it works with .NET native - what app are you tying to build?

@WilliamABradley
Copy link
Contributor Author

WilliamABradley commented May 18, 2018 via email

@nmetulev
Copy link
Contributor

I think that is an issue with the sample app - I'll take a look

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

Successfully merging this pull request may close these issues.

3 participants