add option to focus CSS-selector instead of root.$el

This commit is contained in:
Richard Schreiber
2025-01-31 17:44:29 +01:00
parent d806340594
commit 9b9784f804
@@ -1781,7 +1781,7 @@ var shared_root_methods = {
}
});
},
reload: function () {
reload: function (opt) {
var url;
if (this.$root.is_button) {
return;
@@ -1904,7 +1904,7 @@ var shared_root_methods = {
if (root.$el.contains(document.activeElement)) {
root.$nextTick(function() {
// wait for redraw, then focus content element for better a11y
root.$el.focus();
(opt.focus ? document.querySelector(opt.focus) : root.$el).focus();
});
}
}