mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Fix notification issues
This commit is contained in:
parent
e27115a894
commit
3663c3cf00
2 changed files with 10 additions and 1 deletions
|
|
@ -230,6 +230,10 @@ kpxcUI.createNotification = function(type, message) {
|
|||
const styleSheet = createStylesheet('css/notification.css');
|
||||
notificationWrapper = notificationWrapper || document.createElement('div');
|
||||
this.shadowRoot = notificationWrapper.attachShadow({ mode: 'closed' });
|
||||
if (!this.shadowRoot) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.shadowRoot.append(styleSheet);
|
||||
this.shadowRoot.append(notification);
|
||||
document.body.append(notificationWrapper);
|
||||
|
|
@ -325,7 +329,11 @@ Element.prototype.getLowerCaseAttribute = function(attr) {
|
|||
|
||||
Element.prototype._attachShadow = Element.prototype.attachShadow;
|
||||
Element.prototype.attachShadow = function () {
|
||||
return this._attachShadow({ mode: 'closed' });
|
||||
try {
|
||||
return this._attachShadow({ mode: 'closed' });
|
||||
} catch (e) {
|
||||
console.log('Error: ', e);
|
||||
}
|
||||
};
|
||||
|
||||
Object.prototype.shadowSelector = function(value) {
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@
|
|||
"css/button.css",
|
||||
"css/colors.css",
|
||||
"css/define.css",
|
||||
"css/notification.css",
|
||||
"css/pwgen.css",
|
||||
"css/username.css",
|
||||
"css/totp.css"
|
||||
|
|
|
|||
Loading…
Reference in a new issue