Skip to content

Commit

Permalink
refactor(ui5-popover): fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
TeodorTaushanov committed Nov 16, 2023
1 parent 86f1cad commit 3ab82f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/main/src/Popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ class Popover extends Popup {
this.arrowTranslateY = placement!.arrow.y;

top = this._adjustForIOSKeyboard(top);
const stackingContextOffset = this._getStackingContextOffset(left, top);
const stackingContextOffset = this._getStackingContextOffset();
left -= stackingContextOffset.left;
top -= stackingContextOffset.top;

Expand Down Expand Up @@ -495,7 +495,7 @@ class Popover extends Popup {
return top + (Number.parseInt(this.style.top || "0") - actualTop);
}

_getStackingContextOffset(left: number, top: number) {
_getStackingContextOffset() {
let parentNode = this.parentElement ? this.parentNode as HTMLElement : (this.parentNode as ShadowRoot).host as HTMLElement;

while (parentNode) {
Expand Down
6 changes: 3 additions & 3 deletions packages/main/test/pages/Popover.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<ui5-tab text="tab 1">
<ui5-button id="popbtn">Open Popover</ui5-button>

<ui5-popover placement-type="Bottom" hide-arrow id="danger">
<ui5-dialog placement-type="Bottom" hide-arrow id="danger">

<ui5-list>
<ui5-li>Hello</ui5-li>
Expand All @@ -51,7 +51,7 @@
<ui5-li>Again</ui5-li>
</ui5-list>
</ui5-popover>
</ui5-popover>
</ui5-dialog>
</ui5-tab>
<ui5-tab text="tab 2">

Expand Down Expand Up @@ -462,7 +462,7 @@ <h2>Horizontal Align</h2>
});

popbtn.addEventListener("click", function (event) {
danger.showAt(popbtn);
danger.show(popbtn);
});

bigDanger.addEventListener("click", function (event) {
Expand Down

0 comments on commit 3ab82f4

Please sign in to comment.