TF-1534 Fix cannot selection text on iOS
This commit is contained in:
@@ -65,12 +65,12 @@ class _HtmlContentViewState extends State<HtmlContentViewer> {
|
||||
super.initState();
|
||||
if (PlatformInfo.isAndroid) {
|
||||
_gestureRecognizers = {
|
||||
Factory<LongPressGestureRecognizer>(() => LongPressGestureRecognizer()),
|
||||
Factory<LongPressGestureRecognizer>(() => LongPressGestureRecognizer(duration: _longPressGestureDuration)),
|
||||
Factory<ScaleGestureRecognizer>(() => ScaleGestureRecognizer()),
|
||||
};
|
||||
} else {
|
||||
_gestureRecognizers = {
|
||||
Factory<LongPressGestureRecognizer>(() => LongPressGestureRecognizer()),
|
||||
Factory<LongPressGestureRecognizer>(() => LongPressGestureRecognizer(duration: _longPressGestureDuration)),
|
||||
};
|
||||
}
|
||||
if (PlatformInfo.isAndroid) {
|
||||
@@ -153,9 +153,9 @@ class _HtmlContentViewState extends State<HtmlContentViewer> {
|
||||
}
|
||||
|
||||
void _onLoadStop(InAppWebViewController controller, WebUri? webUri) async {
|
||||
log('_HtmlContentViewState::_onLoadStop:');
|
||||
await _getActualSizeHtmlViewer();
|
||||
_loadingBarNotifier.value = false;
|
||||
log('_HtmlContentViewState::_onLoadStop: GestureRecognizers = $_gestureRecognizers');
|
||||
}
|
||||
|
||||
void _onContentSizeChanged(
|
||||
@@ -211,7 +211,7 @@ class _HtmlContentViewState extends State<HtmlContentViewer> {
|
||||
|
||||
if (!isScrollActivated && PlatformInfo.isIOS) {
|
||||
newGestureRecognizers = {
|
||||
Factory<LongPressGestureRecognizer>(() => LongPressGestureRecognizer()),
|
||||
Factory<LongPressGestureRecognizer>(() => LongPressGestureRecognizer(duration: _longPressGestureDuration)),
|
||||
Factory<HorizontalDragGestureRecognizer>(() => HorizontalDragGestureRecognizer())
|
||||
};
|
||||
}
|
||||
@@ -272,6 +272,8 @@ class _HtmlContentViewState extends State<HtmlContentViewer> {
|
||||
return NavigationActionPolicy.CANCEL;
|
||||
}
|
||||
|
||||
Duration? get _longPressGestureDuration => const Duration(milliseconds: 100);
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_loadingBarNotifier.dispose();
|
||||
|
||||
Reference in New Issue
Block a user