Skip to content

Commit

Permalink
fix: bouncing up when crossing between tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
julia-murashko committed Feb 3, 2021
1 parent 9e2ff2d commit ea7053b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/modules/esl-panel/core/esl-panel-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class ESLPanelStack extends ESLBaseElement {
protected _onBeforeHide(e: CustomEvent) {
const target = e.target;
if (!this.includesPanel(target)) return;
this._previousHeight = this.scrollHeight;
this._previousHeight = this.offsetHeight;
}

/** Animate height of component */
Expand Down
4 changes: 2 additions & 2 deletions src/modules/esl-panel/core/esl-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class ESLPanel extends ESLBasePopup {

protected onShow(params: PanelActionParams) {
super.onShow(params);
this._initialHeight = this.scrollHeight;
this._initialHeight = this.offsetHeight;

if (params.noAnimation) return;

Expand All @@ -63,7 +63,7 @@ export class ESLPanel extends ESLBasePopup {
}

protected onHide(params: PanelActionParams) {
this._initialHeight = this.scrollHeight;
this._initialHeight = this.offsetHeight;
super.onHide(params);

if (params.noAnimation) return;
Expand Down

0 comments on commit ea7053b

Please sign in to comment.