summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-09-30 16:58:46 +0300
committerTor Lillqvist <tml@collabora.com>2020-09-30 21:28:52 +0200
commitc8b1b8623a7bc7d36027001d2c6ce369009dc0f0 (patch)
tree77825c0ea1870cab9832d6b23b1328edb86a3993
parent2aecaeef27b095251d5002eb377764cdfdeb8c4d (diff)
tdf#133279: Add another workaround for loleaflet weirdness
Ignore a hide command that quickly followed a display command. Change-Id: I7be71dbc3ccdffb9db78de4a6b70d59baee14457 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103713 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--ios/CollaboraOnlineWebViewKeyboardManager/CollaboraOnlineWebViewKeyboardManager.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/ios/CollaboraOnlineWebViewKeyboardManager/CollaboraOnlineWebViewKeyboardManager.m b/ios/CollaboraOnlineWebViewKeyboardManager/CollaboraOnlineWebViewKeyboardManager.m
index 18a1128e8..2850f4137 100644
--- a/ios/CollaboraOnlineWebViewKeyboardManager/CollaboraOnlineWebViewKeyboardManager.m
+++ b/ios/CollaboraOnlineWebViewKeyboardManager/CollaboraOnlineWebViewKeyboardManager.m
@@ -140,6 +140,7 @@
WKWebView *webView;
_COWVKMKeyInputControl *control;
BOOL lastCommandIsHide;
+ BOOL lastActionIsDisplay;
}
@end
@@ -222,6 +223,7 @@
control.autocapitalizationType = UITextAutocapitalizationTypeNone;
lastCommandIsHide = NO;
+ lastActionIsDisplay = YES;
[self->webView addSubview:control];
NSLog(@"COKbdMgr: Added _COWVKMKeyInputControl to webView");
@@ -242,7 +244,12 @@
NSLog(@"COKbdMgr: Ignoring hide command that was quickly followed by a display command");
return;
}
+ if (self->lastActionIsDisplay) {
+ NSLog(@"COKbdMgr: Ignoring hide command that quickly followed a display command");
+ return;
+ }
if (self->control != nil) {
+ self->lastActionIsDisplay = NO;
[self->control removeFromSuperview];
NSLog(@"COKbdMgr: Removed _COWVKMKeyInputControl from webView");
self->control = nil;