mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
Move focusManager to ES6
This commit is contained in:
parent
7f72eca5fa
commit
bafe857271
@ -110,6 +110,7 @@
|
|||||||
"src/components/favoriteitems.js",
|
"src/components/favoriteitems.js",
|
||||||
"src/components/fetchhelper.js",
|
"src/components/fetchhelper.js",
|
||||||
"src/components/filterdialog/filterdialog.js",
|
"src/components/filterdialog/filterdialog.js",
|
||||||
|
"src/components/focusManager.js",
|
||||||
"src/components/groupedcards.js",
|
"src/components/groupedcards.js",
|
||||||
"src/components/homeScreenSettings/homeScreenSettings.js",
|
"src/components/homeScreenSettings/homeScreenSettings.js",
|
||||||
"src/components/homesections/homesections.js",
|
"src/components/homesections/homesections.js",
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
define(['dom', 'scrollManager'], function (dom, scrollManager) {
|
import dom from 'dom';
|
||||||
|
import scrollManager from 'scrollManager';
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var scopes = [];
|
var scopes = [];
|
||||||
@ -472,7 +474,7 @@ define(['dom', 'scrollManager'], function (dom, scrollManager) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
export default {
|
||||||
autoFocus: autoFocus,
|
autoFocus: autoFocus,
|
||||||
focus: focus,
|
focus: focus,
|
||||||
focusableParent: focusableParent,
|
focusableParent: focusableParent,
|
||||||
@ -505,4 +507,3 @@ define(['dom', 'scrollManager'], function (dom, scrollManager) {
|
|||||||
focusLast: focusLast,
|
focusLast: focusLast,
|
||||||
moveFocus: moveFocus
|
moveFocus: moveFocus
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
@ -771,7 +771,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
|||||||
loading.hide();
|
loading.hide();
|
||||||
|
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
focusManager.autoFocus(self.itemsContainer);
|
focusManager.default.autoFocus(self.itemsContainer);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -697,7 +697,7 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
|||||||
|
|
||||||
function onFrameClick(e) {
|
function onFrameClick(e) {
|
||||||
if (e.which === 1) {
|
if (e.which === 1) {
|
||||||
var focusableParent = focusManager.focusableParent(e.target);
|
var focusableParent = focusManager.default.focusableParent(e.target);
|
||||||
if (focusableParent && focusableParent !== document.activeElement) {
|
if (focusableParent && focusableParent !== document.activeElement) {
|
||||||
focusableParent.focus();
|
focusableParent.focus();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user