Don't use :has selector

pull/6748/head
Aleksander Machniak 6 years ago
parent 2c38460b09
commit 3719ce0653

@ -1859,9 +1859,9 @@ function rcube_webmail()
var focus_menu_item = function(dir) { var focus_menu_item = function(dir) {
var obj, item, mod = dir < 0 ? 'prevAll' : 'nextAll', limit = dir < 0 ? 'last' : 'first'; var obj, item, mod = dir < 0 ? 'prevAll' : 'nextAll', limit = dir < 0 ? 'last' : 'first';
if (ref.focused_menu && (obj = $('#'+ref.focused_menu))) { if (ref.focused_menu && (obj = $('#'+ref.focused_menu))) {
item = obj.find(':focus').closest('li')[mod](':has(:not([aria-disabled=true]))').find('a,input')[limit](); item = obj.find(':focus').closest('li')[mod]().has(':not([aria-disabled=true])').find('a,input')[limit]();
if (!item.length) if (!item.length)
item = obj.find(':focus').closest('ul')[mod](':has(:not([aria-disabled=true]))').find('a,input')[limit](); item = obj.find(':focus').closest('ul')[mod]().has(':not([aria-disabled=true])').find('a,input')[limit]();
return item.focus().length; return item.focus().length;
} }

@ -204,7 +204,7 @@ function rcube_treelist_widget(node, p)
$(get_item(selection)).find(':focusable').first().focus(); $(get_item(selection)).find(':focusable').first().focus();
} }
else if (!has_focus) { else if (!has_focus) {
container.children('li:has(:focusable)').first().find(':focusable').first().focus(); container.children('li').find(':focusable').first().focus();
} }
}); });
} }

Loading…
Cancel
Save