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

Henry Castro hcvcastro at gmail.com
Sat Oct 29 14:45:55 UTC 2016


 loleaflet/dist/toolbar/toolbar.js |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 52793e8dd29d35c22ba4aa4695e921fd79dd9908
Author: Henry Castro <hcvcastro at gmail.com>
Date:   Sat Oct 29 10:42:40 2016 -0400

    loleaflet: add Ctrl+F for Find

diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index f5fc593..b8d8218 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -1310,6 +1310,14 @@ map.on('statusindicator', function (e) {
 	}
 });
 
+map.on('keydown', function (e) {
+	if (e.originalEvent.ctrlKey &&
+	   (e.originalEvent.key === 'f' || e.originalEvent.key === 'F')) {
+		L.DomUtil.get('search-input').focus();
+		e.originalEvent.preventDefault();
+	}
+});
+
 function onUseritemClicked(e) {
 	var viewId = parseInt(e.currentTarget.id.replace('user-', ''));
 


More information about the Libreoffice-commits mailing list