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

Commit b15189d

Browse files
alaingilbertuser378230
authored andcommitted
fix(bootstrap): remove anchor tag in choices
Resolves issue where page was reloaded when clicking on choice as it was nested in an anchor tag. Switches to using a span tag instead.
1 parent 176182e commit b15189d

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/bootstrap/choices.tpl.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div ng-show="$select.isGrouped" class="ui-select-choices-group-label dropdown-header" ng-bind="$group.name"></div>
77
<div ng-attr-id="ui-select-choices-row-{{ $select.generatedId }}-{{$index}}" class="ui-select-choices-row"
88
ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}" role="option">
9-
<a href="" class="ui-select-choices-row-inner"></a>
9+
<span class="ui-select-choices-row-inner"></span>
1010
</div>
1111
</li>
1212
</ul>

src/common.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ body > .ui-select-bootstrap.open {
220220
border-right: 1px solid #428bca;
221221
}
222222

223-
.ui-select-bootstrap .ui-select-choices-row>a {
223+
.ui-select-bootstrap .ui-select-choices-row>span {
224+
cursor: pointer;
224225
display: block;
225226
padding: 3px 20px;
226227
clear: both;
@@ -230,21 +231,21 @@ body > .ui-select-bootstrap.open {
230231
white-space: nowrap;
231232
}
232233

233-
.ui-select-bootstrap .ui-select-choices-row>a:hover, .ui-select-bootstrap .ui-select-choices-row>a:focus {
234+
.ui-select-bootstrap .ui-select-choices-row>span:hover, .ui-select-bootstrap .ui-select-choices-row>span:focus {
234235
text-decoration: none;
235236
color: #262626;
236237
background-color: #f5f5f5;
237238
}
238239

239-
.ui-select-bootstrap .ui-select-choices-row.active>a {
240+
.ui-select-bootstrap .ui-select-choices-row.active>span {
240241
color: #fff;
241242
text-decoration: none;
242243
outline: 0;
243244
background-color: #428bca;
244245
}
245246

246-
.ui-select-bootstrap .ui-select-choices-row.disabled>a,
247-
.ui-select-bootstrap .ui-select-choices-row.active.disabled>a {
247+
.ui-select-bootstrap .ui-select-choices-row.disabled>span,
248+
.ui-select-bootstrap .ui-select-choices-row.active.disabled>span {
248249
color: #777;
249250
cursor: not-allowed;
250251
background-color: #fff;

0 commit comments

Comments
 (0)