[Libreoffice-commits] online.git: loleaflet/src

Pranav Kant pranavk at collabora.co.uk
Thu Dec 22 10:29:21 UTC 2016


 loleaflet/src/map/Map.js |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit e35fe1c826d2507848ffaaae8a2bcd1ebb6ca031
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Thu Dec 22 15:46:48 2016 +0530

    loleaflet: Focus on textarea after map activation
    
    So that user does not have to click again into the document to
    start typing.
    
    Change-Id: Iaf1993a9a331ab86c668e718fae5f6a727c120cc

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index a04b654..4001cd4 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -567,7 +567,9 @@ L.Map = L.Evented.extend({
 	},
 
 	focus: function () {
+		console.debug('focus:');
 		if (this._docLayer && document.activeElement !== this._docLayer._textArea) {
+			console.debug('focus: focussing');
 			this._docLayer._textArea.focus();
 		}
 	},
@@ -754,6 +756,7 @@ L.Map = L.Evented.extend({
 					var id = vex.dialogID;
 					vex.dialogID = -1;
 					this._startInactiveTimer();
+					this.focus();
 					return vex.close(id);
 				}
 			} else {
@@ -762,6 +765,7 @@ L.Map = L.Evented.extend({
 		}
 
 		this._startInactiveTimer();
+		this.focus();
 		return false;
 	},
 


More information about the Libreoffice-commits mailing list