-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Touch Improvements to TextBox #20848
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
base: master
Are you sure you want to change the base?
Changes from all commits
808d4fe
95994e6
f2f1635
51b298d
3d82482
fcd4c19
0c7b71a
10d4983
9cb7a69
096cc8a
3a5eeff
2a5c005
20e7586
aeb77a9
5e84dcf
c9cec60
45b9fe2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -535,6 +535,8 @@ private void OnScrollGesture(object? sender, ScrollGestureEventArgs e) | |
| var scrollable = Child as ILogicalScrollable; | ||
| var isLogical = scrollable?.IsLogicalScrollEnabled == true; | ||
| var logicalScrollItemSize = new Vector(1, 1); | ||
| var canXScroll = false; | ||
| var canYScroll = false; | ||
|
|
||
| double x = Offset.X; | ||
| double y = Offset.Y; | ||
|
|
@@ -565,6 +567,8 @@ private void OnScrollGesture(object? sender, ScrollGestureEventArgs e) | |
| y += dy; | ||
| y = Math.Max(y, 0); | ||
| y = Math.Min(y, Extent.Height - Viewport.Height); | ||
|
|
||
| canYScroll = dy != 0; | ||
| } | ||
|
|
||
| if (Extent.Width > Viewport.Width) | ||
|
|
@@ -581,6 +585,8 @@ private void OnScrollGesture(object? sender, ScrollGestureEventArgs e) | |
| x += dx; | ||
| x = Math.Max(x, 0); | ||
| x = Math.Min(x, Extent.Width - Viewport.Width); | ||
|
|
||
| canXScroll = dx != 0; | ||
| } | ||
|
|
||
| if (isLogical) | ||
|
|
@@ -615,6 +621,12 @@ private void OnScrollGesture(object? sender, ScrollGestureEventArgs e) | |
|
|
||
| e.Handled = !IsScrollChainingEnabled || offsetChanged; | ||
|
|
||
| if(!e.Handled) | ||
| { | ||
| // Gesture may cause an overscroll so we mark the event as handled if it did. | ||
| e.Handled = canXScroll || canYScroll; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I understand the logic here, won't that prevent scroll chaining in this case?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed while testing, scroll chaining does not work correctly anymore. |
||
| } | ||
|
|
||
| e.ShouldEndScrollGesture = !IsScrollChainingEnabled && !offsetChanged; | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: it's not technically required to
StopaStopwatch, they don't do anything until measured.