Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

fix(uiSelectController): Select by click on non-multiple tagging (bis) #1727

Merged
merged 2 commits into from
Jul 19, 2016
Merged

Conversation

kfedorov
Copy link
Contributor

When in tagging mode, not multiple (taggingLabel === false), selecting an item by click was instead calling taggingFunc(). This fix checks
for this manual selection, whether ctrl.search is filled or not and
acts accordingly.
Same changes made in #1439 that were mysteriously lost.

Closes #1496

an item by click was instead calling taggingFunc(). This fix checks
for this manual selection, whether ctrl.search is filled or not and
acts accordingly.

Same changes mad in #1439 that were mysteriously lost.
Fixes #1357, #1496 and #1409
@kfedorov
Copy link
Contributor Author

@aaronroberson Could you look at this PR, please? It's my first, so feedback would be appreciated.

if(ctrl.tagging.isActivated) {
// if click is made on existing item, prevent from tagging, ctrl.search does not matter
var manualSelection = false;
if($event && $event.type === 'click' && item)
Copy link
Contributor

@user378230 user378230 Jul 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a check down below already... (L438)

if ($event && $event.type === 'click') {
   ctrl.clickTriggeredSelect = true;
 }

Can you combine this/assignment into one and then just check for item?

@aaronroberson aaronroberson merged commit 3dfde71 into angular-ui:master Jul 19, 2016
@kellym
Copy link

kellym commented Mar 8, 2017

This PR is the cause of this bug: #1806.

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

Successfully merging this pull request may close these issues.

Can't select elements with click when when using tagging
4 participants