This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[webview_flutter] Fix scroll bar position for Android non-hybrid WebViews #3765
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
65d14b0
Remove explicit layoutDirection from webview_android.dart. Despite th…
math1man af2b9d1
Update CHANGELOG.md
math1man dfa48d2
Update pubspec.yaml
math1man 793902f
Update webview_flutter_test.dart. Now that the WebView doesn't intern…
math1man 32ceafa
Fix some formatting
math1man 239671b
Fix some formatting
math1man 51baf2d
Merge branch 'master' of https://github.com/flutter/plugins
math1man d90bcd0
Revert "Update webview_flutter_test.dart. Now that the WebView doesn'…
math1man 7b1d8c9
Use Directionality.maybeOf(BuildContext) to specify the correct layou…
math1man bf60a06
Switch two lines to better preserve code history
math1man File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
have you tested it with older Android versions? https://github.com/flutter/plugins/pull/1618/files suggests that this is necessary for some version of Android.
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.
I'm not seeing anywhere in that PR that specifically talks about this choice, or any indication that it would affect older Android versions. I'll do my best to test on a couple versions of Android though.
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.
I've tested on M, O, and R, and haven't seen any negative side effects.
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.
I wonder if Amir meant
TextDirection.ltr.I noted is that this is technically a small breaking change as now a parent widget must provide the layout direction. I don't know how common it's, but by looking at the changes to the unit test, I wonder if changing this value to
TextDirection.ltrremoves potential failures in other unit tests that we don't own.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.
Unsurprisingly, that introduces the inverse problem that in an RTL locale, the scroll bars are on the wrong side.
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.
We could also use https://api.flutter.dev/flutter/widgets/Directionality/maybeOf.html to detect the current direction, and if
nullwe set LTR as the default. wdyt?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.
Oooh that's a neat trick. I left the default as RTL to minimize side effects, but I can swap to LTR if you'd prefer.