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

bug(menu): Error Host already has a portal attached #1104

Closed
cladera opened this issue Aug 23, 2016 · 1 comment · Fixed by #1478
Closed

bug(menu): Error Host already has a portal attached #1104

cladera opened this issue Aug 23, 2016 · 1 comment · Fixed by #1478
Assignees
Labels
P2 The issue is important to a large percentage of users, with a workaround

Comments

@cladera
Copy link
Contributor

cladera commented Aug 23, 2016

Bug, feature request, or proposal:

Bug

What is the expected behavior?

When open a md-menu programatically using trigger's api it should not throw an exception

What is the current behavior?

When a menu is opened and closed several times it eventually throws an exception:

browser_adapter.js:95 Error: Uncaught (in promise): Error: Host already has a portal attached
    at resolvePromise (zone.js:538)
    at resolvePromise (zone.js:523)
    at zone.js:571
    at ZoneDelegate.invokeTask (zone.js:356)
    at Object.onInvokeTask (ng_zone_impl.js:55)
    at ZoneDelegate.invokeTask (zone.js:355)
    at Zone.runTask (zone.js:256)
    at drainMicroTaskQueue (zone.js:474)
    at HTMLInputElement.ZoneTask.invoke (zone.js:426)
    at MdInput.focus (input.js:202)

What are the steps to reproduce?

http://plnkr.co/edit/1KDM4LwHtlpJQAUbAuur?p=preview

What is the use-case or motivation for changing an existing behavior?

I'd want to be able to open and close a menu not only with click event but other events such as "focus".

Which versions of Angular, Material, OS, browsers are affected?

Angular 2.0.0-rc.5 Material 1.0.0-alpha.7-4

Is there anything else we should know?

Besides the error, the plunker does not behave as expected. When using "focus" handler the menu opens but immediately closes. It is necessary to click the input again to open the menu. In my application this does not happen.

@jelbourn jelbourn added the P2 The issue is important to a large percentage of users, with a workaround label Aug 31, 2016
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants