arkon / ng-sidebar

[Inactive] Angular sidebar component.

Home Page:https://echeung.me/ng-sidebar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sidebar should not cover the other elements (z-index) in push and slide mode

RezaRahmati opened this issue · comments

Steps to Reproduce:

  1. Open this https://codesandbox.io/s/filtering-devextreme-data-grid-6zs9y?fontsize=14
  2. click on "Invoice Number" header filter icon

Results You Received:

filter panels opens in wrong position

image

Results You Expected:

filter panel opens in correct position

Note:

I solved the issue in my app by adding these to styles

::ng-deep .ng-sidebar.ng-sidebar--opened.ng-sidebar--push,
::ng-deep .ng-sidebar.ng-sidebar--opened.ng-sidebar--slide {
  z-index: 1;
}

I am not sure if that changes is correct, because it was correct if the mode was "over", so that changes only needed for push and slide

commented

There's basically no winning since I'll never know what the sites that are using the component are like.

Regardless, users are free to override the z-index like the workaround you provided as well.

@arkon I tried to create a branch and do pull request but I got access denied. I would suggest the below code

    .ng-sidebar {
      -webkit-overflow-scrolling: touch;
      overflow: auto;
      pointer-events: auto;
      position: absolute;
      touch-action: auto;
      will-change: initial;
      z-index: 1;
    }

    .ng-sidebar.ng-sidebar--over {
      z-index: 99999999;
    }