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