Skip to content

Commit

Permalink
fix(demos): Fix drawer menu icon position in RTL (#1931)
Browse files Browse the repository at this point in the history
Steps to repro:

1. View the [Persistent Drawer](https://material-components-web.appspot.com/drawer/persistent-drawer.html) and [Temporary Drawer](https://material-components-web.appspot.com/drawer/temporary-drawer.html) demo pages in Edge
2. Open the F12 dev tools
3. Run this snippet in the console to toggle RTL:
    ```js
    var el = document.documentElement; el.dir = el.dir === 'rtl' ? '' : 'rtl';
    ```
4. Observe that the horizontal alignment of the toolbar menu icon is incorrect in RTL mode

Below is a screenshot of the bug this PR is fixing.

- Left side: IE 11 (correct behavior)
- Right side: MS Edge (buggy positioning)

![Screenshot of RTL drawer demo in IE 11 and Edge](https://user-images.githubusercontent.com/409245/34791933-50e44d48-f5fb-11e7-936b-ae3c3a016d85.png)
  • Loading branch information
acdvorak authored Jan 23, 2018
1 parent 20f93a5 commit 8848fcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demos/drawer/persistent-drawer.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<header class="mdc-toolbar mdc-elevation--z4">
<div class="mdc-toolbar__row">
<section class="mdc-toolbar__section mdc-toolbar__section--align-start">
<span>
<span class="catalog-back">
<a href="/" class="mdc-toolbar__menu-icon"><i class="material-icons">&#xE5C4;</i></a>
</span>
<button class="demo-menu material-icons mdc-toolbar__menu-icon">menu</button>
Expand Down
2 changes: 1 addition & 1 deletion demos/drawer/temporary-drawer.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<div class="mdc-toolbar mdc-toolbar--fixed">
<div class="mdc-toolbar__row">
<section class="mdc-toolbar__section mdc-toolbar__section--align-start">
<span>
<span class="catalog-back">
<a href="/" class="mdc-toolbar__menu-icon"><i class="material-icons">&#xE5C4;</i></a>
</span>
<button class="demo-menu material-icons mdc-toolbar__menu-icon">menu</button>
Expand Down

0 comments on commit 8848fcc

Please sign in to comment.