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

AutoFocus results into infinite loop of refocusing #134

Closed
TomasAgoston opened this issue Mar 7, 2016 · 3 comments · Fixed by #137
Closed

AutoFocus results into infinite loop of refocusing #134

TomasAgoston opened this issue Mar 7, 2016 · 3 comments · Fixed by #137
Assignees

Comments

@TomasAgoston
Copy link

With the new version 1.0.7 we get a infinite loop of refocusing on the drawer panel.

We have a drawer panel in our app (actually there are two nested drawer panels) and in that panel we have menu with submenus (multilevel hierarchical menu). On opening and closing of submenus we are modifing the selection in those menus.

With version 1.0.6 of the paper-drawer-panel everything is working OK.

Upgrading to version 1.0.7 results into calls of iron-menu-behaviour's _onFocus handler and the async call of _defaultFocusAsync when opening and closing the submenus.

See the attached screenshot from Chrome's Timeline. You can see the repetative calls in the first row of "Timeline data". The "problematic" timer call is selected with the stack trace.

paper_drawer_panel_focus_cycle_160307

@frankiefu
Copy link
Contributor

Can you post a jsbin that can reproduce the issue?

@blasten blasten mentioned this issue Mar 12, 2016
@blasten
Copy link
Contributor

blasten commented Mar 12, 2016

@TomasAgoston

Can you run bower i PolymerElements/paper-drawer-panel#focus-patch to see if that fixes the issue?

The main issue here seems to be related to async focus retargeting: https://github.com/PolymerElements/iron-menu-behavior/blob/master/iron-menu-behavior.html#L265-L266

@TomasAgoston
Copy link
Author

Sorry for the late response.

The current version 1.0.9 works fine. Thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants