This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(menu): type checkbox should not affect a normal menu item. #8117
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Currently we always wrap the menu-item content inside of a button, if the menu-item has an attribute with `type[checkbox|radio]`. This logic was originally designed for the `md-menu-bar` component, and not for the normal `md-menu`. This caused confusion for developers and should be removed. * Also removed a part of code, which was a duplicate and even not reachable, because the same code returned / exited above. Fixes angular#8110
8dcc56a
to
3780e98
Compare
LGTM 👍 |
crisbeto
added a commit
to crisbeto/material
that referenced
this pull request
Jun 25, 2016
* Fixes the menuItem directive not compiling properly when used together with ngRepeat. This is due to the fact that ngRepeat passes around a documentFragment, instead of a DOM node, which means that it doesn't have a parent and doesn't allow us to properly determine whether the menuItem is inside of a menuBar. This change switches the behavior by making the menuBar directive mark it's children instead. * Minor cleanup in the menuItem directive. * Avoided some repetition in the menuBar unit tests. Referencing angular#8117. Fixes angular#8697.
crisbeto
added a commit
to crisbeto/material
that referenced
this pull request
Jun 25, 2016
* Fixes the menuItem directive not compiling properly when used together with ngRepeat. This is due to the fact that ngRepeat passes around a documentFragment, instead of a DOM node, which means that it doesn't have a parent and doesn't allow us to properly determine whether the menuItem is inside of a menuBar. This change switches the behavior by making the menuBar directive mark it's children instead. * Minor cleanup in the menuItem directive. * Avoided some repetition in the menuBar unit tests. Referencing angular#8117. Fixes angular#8697.
crisbeto
added a commit
to crisbeto/material
that referenced
this pull request
Jun 25, 2016
* Fixes the menuItem directive not compiling properly when used together with ngRepeat. This is due to the fact that ngRepeat passes around a documentFragment, instead of a DOM node, which means that it doesn't have a parent and doesn't allow us to properly determine whether the menuItem is inside of a menuBar. This change switches the behavior by making the menuBar directive mark it's children instead. * Minor cleanup in the menuItem directive. * Avoided some repetition in the menuBar unit tests. Referencing angular#8117. Fixes angular#8697.
crisbeto
added a commit
to crisbeto/material
that referenced
this pull request
Jun 25, 2016
* Fixes the menuItem directive not compiling properly when used together with ngRepeat. This is due to the fact that ngRepeat passes around a documentFragment, instead of a DOM node, which means that it doesn't have a parent and doesn't allow us to properly determine whether the menuItem is inside of a menuBar. This change switches the behavior by making the menuBar directive mark it's children instead. * Minor cleanup in the menuItem directive. * Avoided some repetition in the menuBar unit tests. * Switches to using the prefixer in the menuItem directive. Referencing angular#8117. Fixes angular#8697.
crisbeto
added a commit
to crisbeto/material
that referenced
this pull request
Jun 25, 2016
* Fixes the menuItem directive not compiling properly when used together with ngRepeat. This is due to the fact that ngRepeat passes around a documentFragment, instead of a DOM node, which means that it doesn't have a parent and doesn't allow us to properly determine whether the menuItem is inside of a menuBar. This change switches the behavior by making the menuBar directive mark it's children instead. * Minor cleanup in the menuItem directive. * Avoided some repetition in the menuBar unit tests. * Switches to using the prefixer in the menuItem directive. Referencing angular#8117. Fixes angular#8697.
crisbeto
added a commit
to crisbeto/material
that referenced
this pull request
Jun 25, 2016
* Fixes the menuItem directive not compiling properly when used together with ngRepeat. This is due to the fact that ngRepeat passes around a documentFragment, instead of a DOM node, which means that it doesn't have a parent and doesn't allow us to properly determine whether the menuItem is inside of a menuBar. This change switches the behavior by making the menuBar directive mark it's children instead. * Minor cleanup in the menuItem directive. * Avoided some repetition in the menuBar unit tests. * Switches to using the prefixer in the menuItem directive. Referencing angular#8117. Fixes angular#8697.
ThomasBurleson
pushed a commit
that referenced
this pull request
Jul 10, 2016
* Fixes the menuItem directive not compiling properly when used together with ngRepeat. This is due to the fact that ngRepeat passes around a documentFragment, instead of a DOM node, which means that it doesn't have a parent and doesn't allow us to properly determine whether the menuItem is inside of a menuBar. This change switches the behavior by making the menuBar directive mark it's children instead. * Minor cleanup in the menuItem directive. * Avoided some repetition in the menuBar unit tests. * Switches to using the prefixer in the menuItem directive. Referencing #8117. Fixes #8697. Closes #8852 Closes #8850
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
type[checkbox|radio]
.This logic was originally designed for the
md-menu-bar
component, and not for the normalmd-menu
.This caused confusion for developers and should be removed.
Fixes #8110