Fix share modal extension point

This commit is contained in:
yflory
2018-01-18 11:16:30 +01:00
parent caf9797c7c
commit 6a906e3770
2 changed files with 8 additions and 11 deletions

View File

@@ -57,12 +57,9 @@ define([
};
var customListenForKeys = function (keys, cb, el) {
if (!keys || !keys.length || typeof cb !== "function") { return; }
console.log(keys);
var handler = function (e) {
console.log('keydown', e.which);
e.stopPropagation();
keys.some(function (k) {
console.log(k);
// k is number or array
// if it's an array, it should be [keyCode, "{ctrl|alt|shift|meta}"]
if (Array.isArray(k) && e.which === k[0] && e[k[1] + 'Key']) {