1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fix safari load issues

This commit is contained in:
Luke Pulverenti 2016-04-03 13:36:47 -04:00
parent 948aebfb44
commit f4f15d265c
11 changed files with 98 additions and 358 deletions

View file

@ -59,7 +59,7 @@ define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./icons.html', 'css
if (raisedButtons) {
html += '<paper-button raised class="btnSubmit"><iron-icon icon="dialog:check"></iron-icon><span>' + dialogText.get('Ok') + '</span></paper-button>';
} else {
html += '<div style="text-align:right;">';
html += '<div class="buttons">';
html += '<paper-button class="btnSubmit">' + dialogText.get('Ok') + '</paper-button>';
html += '<paper-button class="btnPromptExit">' + dialogText.get('Cancel') + '</paper-button>';
html += '</div>';
@ -75,8 +75,14 @@ define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./icons.html', 'css
dlg.querySelector('form').addEventListener('submit', function (e) {
submitValue = dlg.querySelector('.txtPromptValue').value;
dialogHelper.close(dlg);
e.preventDefault();
e.stopPropagation();
// Important, don't close the dialog until after the form has completed submitting, or it will cause an error in Chrome
setTimeout(function () {
dialogHelper.close(dlg);
}, 300);
return false;
});
@ -99,6 +105,7 @@ define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./icons.html', 'css
return dialogHelper.open(dlg).then(function () {
var value = submitValue;
if (value) {
return value;
} else {