Improved tabbing
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 3f6d3a5..9aa410d 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -94,6 +94,7 @@
'#search > ol > li:not(.active)'
);
var i = 0;
+
for (i = 0; i < inactiveLi.length; i++) {
inactiveLi[i].addEventListener('click', function (e) {
if (this._match !== undefined)
@@ -103,6 +104,20 @@
};
e.halt();
});
+ inactiveLi[i].addEventListener('keydown', function (e) {
+ var code = _codeFromEvent(e);
+
+ switch (code) {
+ case 32:
+ if (this._match !== undefined)
+ this._match.toggle();
+ else {
+ matchClass.create(this).open();
+ };
+ e.halt();
+ break;
+ };
+ });
};
var result = document.getElementById('resultinfo');
@@ -292,4 +307,3 @@
};
return vc;
};
-