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
0f44fb37b3
commit
3acf184be7
6 changed files with 29 additions and 17 deletions
|
@ -16,12 +16,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.1.85",
|
||||
"_release": "1.1.85",
|
||||
"version": "1.1.86",
|
||||
"_release": "1.1.86",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.1.85",
|
||||
"commit": "9c387d30fa985207e55bebbeeebf1a5b68bc21be"
|
||||
"tag": "1.1.86",
|
||||
"commit": "d54bf3b02ec23fb34fdea6a2cf7b4d707e0d61bf"
|
||||
},
|
||||
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "~1.1.5",
|
||||
|
|
|
@ -82,8 +82,8 @@
|
|||
if (dlg.getAttribute('modal')) {
|
||||
dlg.showModal();
|
||||
} else {
|
||||
addBackdropOverlay(dlg);
|
||||
dlg.show();
|
||||
closeOnBackdropClick(dlg);
|
||||
dlg.showModal();
|
||||
}
|
||||
// Undo the auto-focus applied by the native dialog element
|
||||
safeBlur(document.activeElement);
|
||||
|
@ -116,6 +116,18 @@
|
|||
}
|
||||
}
|
||||
|
||||
function closeOnBackdropClick(dlg) {
|
||||
|
||||
dlg.addEventListener('click', function (event) {
|
||||
var rect = dlg.getBoundingClientRect();
|
||||
var isInDialog = (rect.top <= event.clientY && event.clientY <= rect.top + rect.height
|
||||
&& rect.left <= event.clientX && event.clientX <= rect.left + rect.width);
|
||||
if (!isInDialog) {
|
||||
close(dlg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function autoFocus(dlg) {
|
||||
|
||||
// The dialog may have just been created and webComponents may not have completed initialiazation yet.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue