Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI updates: Fixes #469 make select dropdowns scrollable again (scrolling page will cause issues but no easy fix for this known problem)

Rich Turner83c5b65f74bc
diff --git a/ui/component/or-mwc-components/src/or-mwc-input.ts b/ui/component/or-mwc-components/src/or-mwc-input.ts
index 903446191..077a3fe16 100644
--- a/ui/component/or-mwc-components/src/or-mwc-input.ts
+++ b/ui/component/or-mwc-components/src/or-mwc-input.ts
@@ -890,7 +890,6 @@ export class OrMwcInput extends LitElement {
};
const menuCloseHandler = () => {
- Util.enableScroll();
const v = (this._tempValue ?? this.value);
window.setTimeout(() => {
if (this._mdcComponent) {
@@ -907,10 +906,6 @@ export class OrMwcInput extends LitElement {
this.onValueChange(undefined, val);
};
- const menuOpenedHandler = () => {
- Util.disableScroll();
- };
-
return html`
<div id="component"
class="mdc-select ${classMap(classes)}"
@@ -944,7 +939,7 @@ export class OrMwcInput extends LitElement {
</span>
${!outlined ? html`<div class="mdc-line-ripple"></div>` : ``}
</div>
- <div id="mdc-select-menu" class="mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fixed" @MDCMenuSurface:opened="${menuOpenedHandler}" @MDCMenuSurface:closed="${menuCloseHandler}">
+ <div id="mdc-select-menu" class="mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fixed" @MDCMenuSurface:closed="${menuCloseHandler}">
${getListTemplate(
this.multiple ? ListType.MULTI_TICK : ListType.SELECT,
opts ? html`${opts.map(([optValue, optDisplay], index) => {