mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
20a9c83bf6
commit
308b423658
5 changed files with 21 additions and 15 deletions
|
@ -16,12 +16,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.2.11",
|
||||
"_release": "1.2.11",
|
||||
"version": "1.2.12",
|
||||
"_release": "1.2.12",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.2.11",
|
||||
"commit": "46578959a8407ba9db7d2ae9b27dfa30a5abe6b3"
|
||||
"tag": "1.2.12",
|
||||
"commit": "7f5e97c93b067629c7e3d0da3599ec812ad573b4"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.0",
|
||||
|
|
|
@ -58,7 +58,8 @@ define([], function () {
|
|||
return elem;
|
||||
}
|
||||
|
||||
function isFocusableElementValid(elem) {
|
||||
// Determines if a focusable element can be focused at a given point in time
|
||||
function isCurrentlyFocusable(elem) {
|
||||
|
||||
if (elem.disabled) {
|
||||
return false;
|
||||
|
@ -84,7 +85,7 @@ define([], function () {
|
|||
|
||||
var elem = elems[i];
|
||||
|
||||
if (isFocusableElementValid(elem)) {
|
||||
if (isCurrentlyFocusable(elem)) {
|
||||
focusableElements.push(elem);
|
||||
}
|
||||
}
|
||||
|
@ -203,7 +204,7 @@ define([], function () {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!isFocusableElementValid(curr)) {
|
||||
if (!isCurrentlyFocusable(curr)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -480,6 +481,7 @@ define([], function () {
|
|||
moveDown: function (sourceElement) {
|
||||
nav(sourceElement, 3);
|
||||
},
|
||||
sendText: sendText
|
||||
sendText: sendText,
|
||||
isCurrentlyFocusable: isCurrentlyFocusable
|
||||
};
|
||||
});
|
|
@ -51,8 +51,12 @@ define(['viewcontainer', 'focusManager', 'queryString', 'connectionManager', 'ev
|
|||
focusManager.autoFocus(view);
|
||||
}
|
||||
}
|
||||
else if (view.activeElement) {
|
||||
view.activeElement.focus();
|
||||
else {
|
||||
if (view.activeElement && document.body.contains(view.activeElement) && focusManager.isCurrentlyFocusable(view.activeElement)) {
|
||||
focusManager.focus(view.activeElement);
|
||||
} else {
|
||||
focusManager.autoFocus(view);
|
||||
}
|
||||
}
|
||||
|
||||
view.dispatchEvent(new CustomEvent('viewshow', eventDetail));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue