[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - 2 commits - ios/CollaboraOnlineWebViewKeyboardManager
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 30 16:36:09 UTC 2020
ios/CollaboraOnlineWebViewKeyboardManager/CollaboraOnlineWebViewKeyboardManager.m | 15 +++++++---
1 file changed, 11 insertions(+), 4 deletions(-)
New commits:
commit 827c076059dc6f714e290669470949bec83bb0aa
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Sep 30 16:58:46 2020 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Sep 30 18:36:04 2020 +0200
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/+/103706
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
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;
commit 17043799fde0223ca0f6071f4343aafaadd0c0ab
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Sep 29 16:37:10 2020 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Sep 30 18:35:51 2020 +0200
Fix warning: block implicitly retains 'self'; explicitly mention 'self' ...
... to indicate this is intended behavior.
Change-Id: Id5318bb20b8066364c5e2fd3b704b5a73bac1b42
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103704
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/ios/CollaboraOnlineWebViewKeyboardManager/CollaboraOnlineWebViewKeyboardManager.m b/ios/CollaboraOnlineWebViewKeyboardManager/CollaboraOnlineWebViewKeyboardManager.m
index fd1bcaff3..18a1128e8 100644
--- a/ios/CollaboraOnlineWebViewKeyboardManager/CollaboraOnlineWebViewKeyboardManager.m
+++ b/ios/CollaboraOnlineWebViewKeyboardManager/CollaboraOnlineWebViewKeyboardManager.m
@@ -238,14 +238,14 @@
// to make some sense out of it by not trusting a hide request until we see that it hasn't been
// folllowed by a display request within 100 ms.
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 100000000ll), dispatch_get_main_queue(), ^{
- if (!lastCommandIsHide) {
+ if (!self->lastCommandIsHide) {
NSLog(@"COKbdMgr: Ignoring hide command that was quickly followed by a display command");
return;
}
- if (control != nil) {
- [control removeFromSuperview];
+ if (self->control != nil) {
+ [self->control removeFromSuperview];
NSLog(@"COKbdMgr: Removed _COWVKMKeyInputControl from webView");
- control = nil;
+ self->control = nil;
}
});
}
More information about the Libreoffice-commits
mailing list