Skip to content

fix(select): open method triggered twice on click #7619

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

Merged
merged 1 commit into from
Apr 16, 2018

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Oct 7, 2017

Fixes the open method being triggered both by a click handler on the select trigger and the onContainerClick from the MatFormField integration.

@crisbeto crisbeto requested a review from kara as a code owner October 7, 2017 16:05
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 7, 2017
@mmalerba mmalerba added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Oct 9, 2017
@crisbeto crisbeto force-pushed the select-open-twice branch 2 times, most recently from e920435 to bc9db07 Compare November 20, 2017 20:45
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Dec 6, 2017
@andrewseguin andrewseguin added the presubmit failures This PR has failures in Google's internal presubmit process and cannot be immediately merged label Dec 13, 2017
@mmalerba
Copy link
Contributor

mmalerba commented Mar 8, 2018

I think this is breaking tests because people are simulating clicks on the trigger, and the simulated clicks don't bubble. I also realized that people technically should be able to use the mat-select outside of the mat-form-field if they want. Maybe instead we can just check the target of the event in onContainerClick and ignore it if it was the trigger element?

@mmalerba mmalerba removed action: merge The PR is ready for merge by the caretaker presubmit failures This PR has failures in Google's internal presubmit process and cannot be immediately merged labels Mar 8, 2018
@crisbeto crisbeto force-pushed the select-open-twice branch from bc9db07 to 83c5bcf Compare March 8, 2018 11:01
@crisbeto
Copy link
Member Author

crisbeto commented Mar 8, 2018

Reworked the PR to check internally for the _panelOpen flag @mmalerba.

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Mar 8, 2018
@josephperrott
Copy link
Member

@crisbeto Can you rebase and we can try to get this one in?

Fixes the `open` method being triggered both by a click handler on the select trigger and the `onContainerClick` from the `MatFormField` integration.
@crisbeto crisbeto force-pushed the select-open-twice branch from 83c5bcf to 5752171 Compare March 31, 2018 07:44
@crisbeto
Copy link
Member Author

Rebased.

@mmalerba mmalerba merged commit 991daac into angular:master Apr 16, 2018
@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants