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

Henry Castro hcastro at collabora.com
Thu Dec 22 17:40:57 UTC 2016


 loleaflet/src/control/Toolbar.js |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 1bede62b132e61fa847aaf066447c2670d14dbab
Author: Henry Castro <hcastro at collabora.com>
Date:   Thu Dec 22 13:41:26 2016 -0400

    tdf#103779: Help menu accessibility

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 8ad990a..466d698 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -215,6 +215,8 @@ L.Map.include({
 						translatableContent[i].firstChild.nodeValue = translatableContent[i].firstChild.nodeValue.toLocaleString();
 					}
 
+					$('.vex-content').attr('tabindex', -1);
+					$('.vex-content').focus();
 					// workaround for https://github.com/HubSpot/vex/issues/43
 					$('.vex-overlay').css({ 'pointer-events': 'none'});
 					$('.vex').click(function() {
@@ -223,6 +225,9 @@ L.Map.include({
 					$('.vex-content').click(function(e) {
 						e.stopPropagation();
 					});
+				},
+				beforeClose: function () {
+					map.focus();
 				}
 			});
 		});
@@ -245,6 +250,7 @@ L.Map.include({
 			contentCSS: { width: w + 'px'},
 			buttons: {},
 			afterOpen: function($vexContent) {
+				map.enable(false);
 				// workaround for https://github.com/HubSpot/vex/issues/43
 				$('.vex-overlay').css({ 'pointer-events': 'none'});
 				$('.vex').click(function() {
@@ -253,6 +259,9 @@ L.Map.include({
 				$('.vex-content').click(function(e) {
 					e.stopPropagation();
 				});
+			},
+			beforeClose: function () {
+				map.enable(true);
 			}
 		});
 	}


More information about the Libreoffice-commits mailing list