Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening NbSelect hides nb-layout-header #1158

Closed
1 of 2 tasks
theroozbeh opened this issue Jan 16, 2019 · 3 comments
Closed
1 of 2 tasks

Opening NbSelect hides nb-layout-header #1158

theroozbeh opened this issue Jan 16, 2019 · 3 comments

Comments

@theroozbeh
Copy link

Issue type

I'm submitting a

  • bug report
  • feature request

Issue description

Current behavior:
If you have nb-layout-header on a page and nb-select inside nb-layout-column and if page's height is bigger than your screen and you open the nb-select after scrolling, the nb-layout-header would disappear.

Expected behavior:
nb-layout-header shouldn't move or disappear after scrolling the page and opening the nb-select

Steps to reproduce:
create nb-layout then inside it one nb-layout-header and one nb-layout-column. Then put a div Inside nb-layout-column with height bigger than the screen, so you can to scroll it then put a nb-select inside this div in a position that you have to scroll in order to get to it, then open then nb-select to see the issue.

Related code:
Please take a look at this StackBlitz code, keep in mind that you have to scroll first then open nb-select to see this behavior.
StackBlitz nb-select-issue Project

@maihannijat
Copy link
Contributor

I also confirm the bug - It is happening to my project as well.

@dizco
Copy link
Contributor

dizco commented Mar 4, 2019

I'm not sure exactly why this bug is happening, but I notice that it's related to the fact that a style is added to the html tag with a top value in the negatives. The more you scroll down before opening the nb-select, the lower the top value is.

I tried to reproduce the issue in the official documentation examples and was unable to. Don't know what the difference is...

Anyone have an idea how we could fix this annoying bug?

@nnixaa nnixaa added this to the 3.5.0 milestone Mar 12, 2019
@ghost
Copy link

ghost commented Mar 21, 2019

I've got very similar issue. When the select is expanded my layout gets messed up. The following 4 pictures show:

  1. Page not scrolled and City select not expanded.
  2. Page not scrolled and City select expanded. Note the scroll bar that appears on the right.
  3. Page was scrolled down in order to choose the brand.
  4. Brand select expanded. Note that the header has disappeared and the blank, white space has appeared at the bottom.

Pic. 1.
Screenshot at 2019-03-21 15:08:56

Pic. 2.
Screenshot at 2019-03-21 15:09:00

Pic. 3.
Screenshot at 2019-03-21 15:09:06

Pic. 4
Screenshot at 2019-03-21 15:09:13

This is my template:

<nb-layout [center]="layout.id === 'center-column'" windowMode>
      <nb-layout-header fixed>
        <ngx-header [subtitle]="subtitle" [position]="sidebar.id === 'start' ? 'normal': 'inverse'"></ngx-header>
      </nb-layout-header>

      <nb-sidebar class="menu-sidebar" tag="menu-sidebar" responsive [end]="sidebar.id === 'end'">
        <nb-sidebar-header>
          <button routerLink="/dashboard" class="btn btn-hero-warning main-btn">
            <i class="fa fa-dashboard"></i> <span>Menu</span>
          </button>
        </nb-sidebar-header>
        <ng-content select="nb-menu"></ng-content>
      </nb-sidebar>

      <nb-layout-column class="main-content">
        <ng-content select="router-outlet"></ng-content>
      </nb-layout-column>
</nb-layout>

P.S. What's interesting, this does happen also on ngx-admin (http://akveo.com/ngx-admin/pages/extra-components/form-inputs) when cloned and run locally. However, on http://akveo.com/ngx-admin/pages/extra-components/form-inputs it does not happen.

Locally:
Screenshot at 2019-03-21 15:31:22

On http://akveo.com/ngx-admin/pages/extra-components/form-inputs
Screenshot at 2019-03-21 15:32:33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants