summaryrefslogtreecommitdiff
path: root/loleaflet/src/map/Map.js
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2020-03-24 19:08:35 -0400
committerAndras Timar <andras.timar@collabora.com>2020-03-26 17:57:15 +0100
commitb22c49c555e99f20c377164265b215f57dabbedf (patch)
treed6c743678e30386317a48e7330b14a187e63e09f /loleaflet/src/map/Map.js
parent3c758f5aacaf874e78234e7d3b5d54852946ab6a (diff)
leaflet: shouldAcceptInput -> canAcceptKeyboardInput
Clearer name to differentiate intent from expectation. Change-Id: I74cc4c3bca11782bdd9cf72d6af4534357cefa64 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91016 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91128 Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'loleaflet/src/map/Map.js')
-rw-r--r--loleaflet/src/map/Map.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index cc683de13..f8522d1b8 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -333,7 +333,7 @@ L.Map = L.Evented.extend({
// There is no way track the keyboard state
// programmatically, so the next best thing
// is to track what we intended to do.
- window.shouldAcceptInput = function() { return map.shouldAcceptInput(); };
+ window.canAcceptKeyboardInput = function() { return map.canAcceptKeyboardInput(); };
// This is used to extract the text we *intended*
// to put on the clipboard. There is currently
@@ -970,8 +970,10 @@ L.Map = L.Evented.extend({
return document.activeElement === this._textInput.activeElement();
},
- shouldAcceptInput: function() {
- return this._textInput.shouldAcceptInput();
+ // Returns true iff the textarea is enabled and we focused on it.
+ // On mobile, this signifies that the keyboard should be visible.
+ canAcceptKeyboardInput: function() {
+ return this._textInput.canAcceptKeyboardInput();
},
setHelpTarget: function(page) {