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

Vertical positioning of flexible connected overlay on mobile #13614

Open
oschlegel opened this issue Oct 15, 2018 · 8 comments
Open

Vertical positioning of flexible connected overlay on mobile #13614

oschlegel opened this issue Oct 15, 2018 · 8 comments
Labels
area: cdk/overlay P4 A relatively minor issue that is not relevant to core functions

Comments

@oschlegel
Copy link

oschlegel commented Oct 15, 2018

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Flexible connected overlays are positioned correct even if the user is scrolling

What is the current behavior?

Scrolling affects the vertical positioning of the overlay. The overlay is positioned to low.

What are the steps to reproduce?

Scroll down a page on a mobile device (not to the end of the page, but somewhere in the middle) and then open the flexible connected overlay. The overlay seems to be positioned to low.

Example desktop:
bildschirmfoto 2018-10-15 um 07 34 49

Example mobile:
bildschirmfoto 2018-10-15 um 07 34 25

Configuration of the overlay:

const positionStrategy = this.overlay
      .position()
      .flexibleConnectedTo(this.elementRef) // <-- elementRef is the icon element from the screenshot
      .withPositions([
        { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' },
        { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' }
      ])
      .withPush(false);
    this.overlay.create({
      positionStrategy,
      scrollStrategy: this.overlay.scrollStrategies.reposition()
    });

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

@angular/core: 6.1.0
@angular/material: 6.4.7
@angular/cdk: 7.0.0-rc.1
typescript: 2.7.2

@josephperrott
Copy link
Member

Can you provide a reproduction in StackBlitz. This will help us to investigate the issue you are seeing.

@josephperrott josephperrott added the cannot reproduce The team is unable to reproduce this issue with the information provided label Nov 2, 2018
@josephperrott josephperrott self-assigned this Nov 2, 2018
@oschlegel
Copy link
Author

oschlegel commented Nov 5, 2018

Thanks for your answer @josephperrott.

I made a example for you: https://stackblitz.com/edit/angular-jh76xz

You have to open the example on a real mobile device. You will find three touchable elements on the page. The first and the last element work as expected, but hen you touch the second element you will see that the position of the opened overlay is not correct

@MitkoTschimev
Copy link

Is there any progress?

@josephperrott josephperrott added P4 A relatively minor issue that is not relevant to core functions responsive and removed cannot reproduce The team is unable to reproduce this issue with the information provided labels Nov 27, 2018
@oschlegel
Copy link
Author

Anything happened here?

@SecilDemirbas
Copy link

Bug still exists. Is there any progress on this Bug?

@bramvanoploo
Copy link

We are having the exact same issue. Curious to know if there is a workaround or solution in sight?

@ShukinDmitriy
Copy link

Hello! I proposed a solution to this problem here #28425

@ShukinDmitriy
Copy link

@crisbeto @andrewseguin could you look at mine PR #28425 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cdk/overlay P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

No branches or pull requests

8 participants