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

Right drawer - graphical bug #142

Open
OtherOfIce opened this issue May 22, 2016 · 1 comment
Open

Right drawer - graphical bug #142

OtherOfIce opened this issue May 22, 2016 · 1 comment

Comments

@OtherOfIce
Copy link

OtherOfIce commented May 22, 2016

Description

Have an <a href=""> inside a right hand drawer, then change the visibility to visible. When trying to open the drawer (using a paper icon) on mobile a graphical bug occurs (about 1/2 the time).

<meta name="viewport" content="width=device-width,initial-scale=1">

<paper-drawer-panel right-drawer>
      <paper-header-panel main>
            <paper-toolbar style="background-color : #1f7a1f">
                  <paper-icon-button icon="menu" paper-drawer-toggle=""></paper-icon-button>
            </paper-toolbar>
      </paper-header-panel>
      <paper-header-panel  drawer>
            <a id="sidebar" href=""> turf</a>
      </paper-header-panel>
</paper-drawer-panel>

        <script>document.getElementById("sidebar").style.visibility = "visible";</script>

EDIT: http://output.jsbin.com/tojobevopo Look at this using the chrome dev tools mobile view or on a phone.

@blasten
Copy link
Contributor

blasten commented Aug 16, 2016

Here's how to workaround it http://jsbin.com/lagowa/edit?html,output. The issue is caused by calling focus on an element too early on the transition of the drawer, basically when that element is off screen. On mobile, Chrome seems to bring that element into view which causes that bizarre effect.
You can also use app-layout which doesn't have this issue because focus is called at the end of the transition. e.g. Toggle device mode and try this on chrome.

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

2 participants