Explorar el Código

[fix] hotkey fix for Safari (#2175)

version-14
Faris Ansari hace 8 años
committed by Rushabh Mehta
padre
commit
5a75f04bd7
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. +4
    -0
      frappe/public/js/frappe/ui/keyboard.js

+ 4
- 0
frappe/public/js/frappe/ui/keyboard.js Ver fichero

@@ -3,6 +3,10 @@ frappe.provide('frappe.ui.keys.handlers');
frappe.ui.keys.setup = function() {
$(window).on('keydown', function(e) {
var key = e.key;
//safari doesn't have key property
if(!key) {
key = String.fromCharCode(e.keyCode).toLowerCase();
}
if(key.substr(0, 5)==='Arrow') {
// ArrowDown -> down
key = key.substr(5).toLowerCase();


Cargando…
Cancelar
Guardar