fix Uncaught TypeError: Failed to execute 'getComputedStyle'

thought the image no longer changes, when selecting another one :(
This commit is contained in:
ralf 2022-09-05 13:59:07 +02:00
parent a559e2d3da
commit 1ec9ef63fe

View File

@ -517,7 +517,7 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(superclass
// Move search (& menu) if there's no value
this._activeControls?.classList.toggle("novalue", this.multiple && this.value == '');
this.dropdown?.setAttribute("distance",
this._activeControls?.classList.contains("novalue") ?
!this._activeControls || this._activeControls?.classList.contains("novalue") ?
"" :
// Make room for search below
parseInt(getComputedStyle(this._activeControls).getPropertyValue("--sl-input-height-medium"))