mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Stop pages from being able to style the shadow DOM wrapper div element.
This commit is contained in:
parent
5b87a10cbb
commit
62a9bb59e1
6 changed files with 6 additions and 0 deletions
|
|
@ -88,6 +88,7 @@ class Autocomplete {
|
|||
const colorStyleSheet = createStylesheet('css/colors.css');
|
||||
this.wrapper = kpxcUI.createElement('div');
|
||||
this.wrapper.style.display = 'none';
|
||||
this.wrapper.style.all = 'unset';
|
||||
styleSheet.addEventListener('load', () => this.wrapper.style.display = 'block');
|
||||
this.container = kpxcUI.createElement('div', 'kpxcAutocomplete-container', { 'id': 'kpxcAutocomplete-container' });
|
||||
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ kpxcBanner.create = async function(credentials = {}) {
|
|||
|
||||
const wrapper = document.createElement('div');
|
||||
wrapper.style.display = 'none';
|
||||
wrapper.style.all = 'unset';
|
||||
styleSheet.addEventListener('load', () => wrapper.style.display = 'block');
|
||||
this.shadowRoot = wrapper.attachShadow({ mode: 'closed' });
|
||||
this.shadowRoot.append(colorStyleSheet);
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ kpxcCustomLoginFieldsBanner.create = async function() {
|
|||
|
||||
const wrapper = document.createElement('div');
|
||||
wrapper.style.display = 'none';
|
||||
wrapper.style.all = 'unset';
|
||||
styleSheet.addEventListener('load', () => wrapper.style.display = 'block');
|
||||
this.shadowRoot = wrapper.attachShadow({ mode: 'closed' });
|
||||
this.shadowRoot.append(colorStyleSheet);
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@ TOTPFieldIcon.prototype.createIcon = function(field, segmented = false) {
|
|||
const styleSheet = createStylesheet('css/totp.css');
|
||||
const wrapper = document.createElement('div');
|
||||
wrapper.style.display = 'none';
|
||||
wrapper.style.all = 'unset';
|
||||
styleSheet.addEventListener('load', () => wrapper.style.display = 'block');
|
||||
|
||||
this.shadowRoot = wrapper.attachShadow({ mode: 'closed' });
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ kpxcUI.createNotification = function(type, message) {
|
|||
const styleSheet = createStylesheet('css/notification.css');
|
||||
notificationWrapper = notificationWrapper || document.createElement('div');
|
||||
notificationWrapper.style.display = 'none';
|
||||
notificationWrapper.style.all = 'unset';
|
||||
styleSheet.addEventListener('load', () => notificationWrapper.style.display = 'block');
|
||||
this.shadowRoot = notificationWrapper.attachShadow({ mode: 'closed' });
|
||||
if (!this.shadowRoot) {
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ UsernameFieldIcon.prototype.createIcon = function(field) {
|
|||
const styleSheet = createStylesheet('css/username.css');
|
||||
const wrapper = document.createElement('div');
|
||||
wrapper.style.display = 'none';
|
||||
wrapper.style.all = 'unset';
|
||||
styleSheet.addEventListener('load', () => wrapper.style.display = 'block');
|
||||
|
||||
this.shadowRoot = wrapper.attachShadow({ mode: 'closed' });
|
||||
|
|
|
|||
Loading…
Reference in a new issue