diff --git a/modules/backend/assets/js/october.flyout.js b/modules/backend/assets/js/october.flyout.js
index 2f49925726..1d5c9b15ae 100644
--- a/modules/backend/assets/js/october.flyout.js
+++ b/modules/backend/assets/js/october.flyout.js
@@ -172,7 +172,7 @@
}
Flyout.prototype.onDocumentKeydown = function(ev) {
- if (ev.which == 27) {
+ if (ev.key === 'Escape') {
this.hide();
}
}
diff --git a/modules/backend/formwidgets/richeditor/assets/js/plugins/figures.js b/modules/backend/formwidgets/richeditor/assets/js/plugins/figures.js
index a82ca02e2a..fed8db5bc5 100644
--- a/modules/backend/formwidgets/richeditor/assets/js/plugins/figures.js
+++ b/modules/backend/formwidgets/richeditor/assets/js/plugins/figures.js
@@ -85,28 +85,24 @@
}
function _handleUiBlocksKeydown(ev) {
- if (ev.which == 40 || ev.which == 38 || ev.which == 8 || ev.which == 46) {
+ if (ev.key === 'ArrowDown' || ev.key === 'ArrowUp' || ev.key === 'Backspace' || ev.key === 'Delete') {
var $block = $(editor.selection.element())
if ($block.is('br')) {
$block = $block.parent()
}
if (!!$block.length) {
- switch (ev.which) {
- case 38:
- // Up arrow
+ switch (ev.key) {
+ case 'ArrowUp':
_handleUiBlockCaretIn($block.prev())
break
- case 40:
- // Down arrow
+ case 'ArrowDown':
_handleUiBlockCaretIn($block.next())
break
- case 46:
- // Delete key
+ case 'Delete':
_handleUiBlockCaretClearEmpty($block.next(), $block)
break
- case 8:
- // Backspace key
+ case 'Backspace':
_handleUiBlockCaretClearEmpty($block.prev(), $block)
break
}
@@ -133,27 +129,23 @@
}
function _uiBlockKeyDown(ev, block) {
- if (ev.which == 40 || ev.which == 38 || ev.which == 13 || ev.which == 8 || ev.which == 46) {
- switch (ev.which) {
- case 40:
- // Down arrow
+ if (ev.key === 'ArrowDown' || ev.key === 'ArrowUp' || ev.key === 'Enter' || ev.key === 'Backspace' || ev.key === 'Delete') {
+ switch (ev.key) {
+ case 'ArrowDown':
_focusUiBlockOrText($(block).next(), true)
break
- case 38:
- // Up arrow
+ case 'ArrowUp':
_focusUiBlockOrText($(block).prev(), false)
break
- case 13:
- // Enter key
+ case 'Enter':
var $paragraph = $('
')
$paragraph.insertAfter(block)
editor.selection.setAfter(block)
editor.selection.restore()
editor.undo.saveStep()
break
- case 8:
- case 46:
- // Delete / Backspace key
+ case 'Backspace':
+ case 'Delete':
var $nextFocus = $(block).next(),
gotoStart = true
diff --git a/modules/backend/widgets/mediamanager/assets/js/mediamanager-browser-min.js b/modules/backend/widgets/mediamanager/assets/js/mediamanager-browser-min.js
index 0d9d535f36..6d2631a70d 100644
--- a/modules/backend/widgets/mediamanager/assets/js/mediamanager-browser-min.js
+++ b/modules/backend/widgets/mediamanager/assets/js/mediamanager-browser-min.js
@@ -454,13 +454,13 @@ MediaManager.prototype.onSortingChanged=function(ev){var $target=$(ev.target),da
if($target.data('sort')=='by'){data.sortBy=$target.val();}else if($target.data('sort')=='direction'){data.sortDirection=$target.val()}
this.execNavigationRequest('onSetSorting',data)}
MediaManager.prototype.onKeyDown=function(ev){var eventHandled=false
-switch(ev.which){case 13:var items=this.getSelectedItems(true,true)
+switch(ev.key){case 'Enter':var items=this.getSelectedItems(true,true)
if(items.length>0)
this.navigateToItem($(items[0]))
eventHandled=true
-break;case 39:case 40:this.selectRelative(true,ev.shiftKey)
+break;case 'ArrowRight':case 'ArrowDown':this.selectRelative(true,ev.shiftKey)
eventHandled=true
-break;case 37:case 38:this.selectRelative(false,ev.shiftKey)
+break;case 'ArrowLeft':case 'ArrowUp':this.selectRelative(false,ev.shiftKey)
eventHandled=true
break;}
if(eventHandled){ev.preventDefault()
diff --git a/modules/backend/widgets/mediamanager/assets/js/mediamanager.js b/modules/backend/widgets/mediamanager/assets/js/mediamanager.js
index f0b5510108..4d46f6b382 100644
--- a/modules/backend/widgets/mediamanager/assets/js/mediamanager.js
+++ b/modules/backend/widgets/mediamanager/assets/js/mediamanager.js
@@ -1025,6 +1025,7 @@
var item = items[i],
path = item.getAttribute('data-path')
+
if (item.getAttribute('data-item-type') == 'folder')
data.folders.push(path)
else
@@ -1250,21 +1251,22 @@
MediaManager.prototype.onKeyDown = function(ev) {
var eventHandled = false
- switch (ev.which) {
- case 13:
+
+ switch (ev.key) {
+ case 'Enter':
var items = this.getSelectedItems(true, true)
if (items.length > 0)
this.navigateToItem($(items[0]))
eventHandled = true
break;
- case 39:
- case 40:
+ case 'ArrowRight':
+ case 'ArrowDown':
this.selectRelative(true, ev.shiftKey)
eventHandled = true
break;
- case 37:
- case 38:
+ case 'ArrowLeft':
+ case 'ArrowUp':
this.selectRelative(false, ev.shiftKey)
eventHandled = true
break;
diff --git a/modules/backend/widgets/table/assets/js/build-min.js b/modules/backend/widgets/table/assets/js/build-min.js
index ec262147f7..9717d65ec8 100644
--- a/modules/backend/widgets/table/assets/js/build-min.js
+++ b/modules/backend/widgets/table/assets/js/build-min.js
@@ -269,11 +269,11 @@ var target=this.getEventTarget(ev,'TD')
if(!target){this.unfocusTable();return;}
if(target.tagName!='TD'){this.unfocusTable();return;}
this.focusCell(target,true)}
-Table.prototype.onKeydown=function(ev){if(ev.keyCode==65&&ev.altKey&&this.options.adding){if(!ev.shiftKey){this.addRecord('below')}
+Table.prototype.onKeydown=function(ev){if((ev.key==='a'||ev.key==='A')&&ev.altKey&&this.options.adding){if(!ev.shiftKey){this.addRecord('below')}
else{this.addRecord('above')}
this.stopEvent(ev)
return}
-if(ev.keyCode==68&&ev.altKey&&this.options.deleting){this.deleteRecord()
+if((ev.key==='d'||ev.key==='D')&&ev.altKey&&this.options.deleting){this.deleteRecord()
this.stopEvent(ev)
return}
for(var i=0,len=this.options.columns.length;i