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

Clicking on the cross to remove an option in multi-select box of Angular-UI-Select redirects to app home #187

Closed
robinmitra opened this issue Sep 11, 2014 · 9 comments
Milestone

Comments

@robinmitra
Copy link
Contributor

I have an AngularJS app with multiple routes. On one of the pages, I'm using Angular-UI-Select.

Clicking on the cross button to remove an option in the multi-select box of Angular-UI-Select redirects to the home of the app, instead of removing the option.

I think the reason for this issue could be that the URL already has a # at the app home, and the cross button is also linking to # causing the browser to redirect to the home. I have manually changed href="#" to href for the cross button in the ui-select's template, which has fixed the issue.

Is there a workaround for this without needing the change that I made? Otherwise, I could submit my pull request if you would like.

I have also created a question for this on Stack Overflow.

@dimirc
Copy link
Contributor

dimirc commented Sep 12, 2014

Maybe could be related to #185 that was solved yesterday but is on master only. I'll be releasing a new version 0.7.1 in a while to update from bower. Anyway check first if it's the same and let me know to close this issue if that's the case.

@cgross
Copy link

cgross commented Sep 26, 2014

Also encountering this issue.

@pderksen
Copy link
Contributor

Also experiencing similar unexpected behavior when removing a tag by clicking on the "x". Backspace/delete does not cause the same issue.

@pderksen
Copy link
Contributor

@nadersoliman
Copy link

+1

@tvervest
Copy link
Contributor

tvervest commented Oct 5, 2014

great fix and addition to the library! +1

@redmagic
Copy link

redmagic commented Oct 6, 2014

Would it not be an option to add the event to $select.removeChoice($index) in the templates, like $select.removeChoice($index, $event) and stop the event from propagating if the event parameter is present?

@dimirc
Copy link
Contributor

dimirc commented Oct 6, 2014

@redmagic will be better to open a different issue for that feature request

@dimirc
Copy link
Contributor

dimirc commented Oct 6, 2014

The fix for this issue landed as 64dc9af

@dimirc dimirc closed this as completed Oct 6, 2014
@dimirc dimirc added this to the 0.9.x milestone Oct 6, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants