Skip to content

Commit eeef282

Browse files
committed
refactor: move _updateMediaRange back to the dialog
1 parent d3c6669 commit eeef282

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

packages/main/cypress/specs/MultiComboBox.mobile.cy.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,11 @@ describe("Typeahead", () => {
224224
cy.get("@input")
225225
.realClick();
226226

227+
cy.get("[ui5-multi-combobox]")
228+
.shadow()
229+
.find<ResponsivePopover>("[ui5-responsive-popover]")
230+
.ui5ResponsivePopoverOpened();
231+
227232
cy.get("[ui5-multi-combobox]")
228233
.shadow()
229234
.find("[ui5-responsive-popover]")

packages/main/src/Dialog.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,10 @@ class Dialog extends Popup {
329329

330330
_show() {
331331
super._show();
332-
requestAnimationFrame(this._center.bind(this));
332+
requestAnimationFrame(() => {
333+
this._updateMediaRange();
334+
this._center();
335+
});
333336
}
334337

335338
onBeforeRendering() {

packages/main/src/Popup.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,6 @@ abstract class Popup extends UI5Element {
604604
if (this.isConnected) {
605605
this.setAttribute("popover", "manual");
606606
this.showPopover();
607-
608-
requestAnimationFrame(this._updateMediaRange.bind(this));
609607
}
610608
}
611609

0 commit comments

Comments
 (0)