material icon indicating copy to clipboard operation
material copied to clipboard

mdToast displays in incorrect position if page is scrolled

Open dozingcat opened this issue 11 years ago • 2 comments

Demo: http://codepen.io/anon/pen/zGRZav . Scroll down a bit and click the "Show toast" link. The toast appears in what would be the bottom left if the page had not been scrolled, but is now the middle or top of the window. Observed in both Chrome and Firefox.

dozingcat avatar Jul 01 '15 20:07 dozingcat

  1. Move ng-app to head
  2. Apply layout="column" to body
  3. Wrap content with <md-content></md-content>
  4. Add overflow-y: hidden !important to body css to avoid double scrollbars when toast is being shown (and other material components)
  5. Drink beer.

http://codepen.io/dani3l/pen/PqQpgB

As much as I know the toasts are no position: fixed so they can be used with FAB buttons (see here) and follow material design styleguide

dani3l avatar Jul 01 '15 21:07 dani3l

@dozingcat @dani3l there is an open issue for this at #1106.

ilanbiala avatar Jul 16 '15 14:07 ilanbiala