Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

md-select causes page to jump when an option is clicked, only in IE #4640

Closed
danneniko opened this issue Sep 15, 2015 · 6 comments
Closed

md-select causes page to jump when an option is clicked, only in IE #4640

danneniko opened this issue Sep 15, 2015 · 6 comments
Assignees
Labels
browser: IE This issue is specific to Internet Explorer
Milestone

Comments

@danneniko
Copy link

md-select causes page to jump when an option is clicked, only in IE. Works fine in chrome and FF. But trying in IE11, it does this.
Any workarounds?

@rschmukler rschmukler self-assigned this Sep 28, 2015
@rschmukler rschmukler added this to the 0.12.0 milestone Sep 28, 2015
@rschmukler rschmukler added browser: IE This issue is specific to Internet Explorer priority: medium labels Sep 28, 2015
@ThomasBurleson ThomasBurleson modified the milestones: 1.0-rc1, 1.0-rc2, 1.0-rc3 Oct 27, 2015
@wolfika
Copy link

wolfika commented Nov 7, 2015

Actually, the problem is not with md-select but with the backdrop/click-catcher that is applied to the page when components like selects or dialogs are opened. For some reason, IE doesn't like offsetting the <body> position and modifying its width.

I managed to hotfix this in my codebase like this (SCSS):

_:-ms-input-placeholder, :root {
  body[style] {
    position: inherit !important;
    top: inherit !important;
    width: inherit !important;
  }

  .md-click-catcher.md-wbTheme-theme {
    height: 100%;
    position: fixed;
    width: 100%;
  }
}

This prevents the page from jumping when a select is closed, but the whole thing is broken nonetheless, performance on IE is still really bad, and this is a dirty fix.

@GTarifshabbir
Copy link

thanks @wolfika thats what i am looking for

@Pravin-Parkhi
Copy link

@wolfika Thanks for the solution. This solves the page jump issue when we open the md-select dropdown. But when we select any option from the dropdown that time page jumps. Is there any fix for the same?

@EightArmCode
Copy link

This fix actually caused a different problem for me. With this solution applied, the open menu does not remain positioned above its parent element, but instead scrolls with the page.

@alecpirillo
Copy link

Is there an equivalent workaround for md-dialog similar to the one above by @wolfika?

@imannorouzi
Copy link

imannorouzi commented Sep 27, 2017

Here is my workaround for md-dialog

Here is a workaround. Just move the scroll from the body element to an inner element like below:

< body>
< div id="container">
< /div>
< body>
// Style
body{
height: 100%;
width: 100%;
overflow: hidden;
}
#container{
height: 100%;
width: 100%;
overflow-y: scroll;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
browser: IE This issue is specific to Internet Explorer
Projects
None yet
Development

No branches or pull requests

9 participants