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

Commit df211bd

Browse files
committed
fix(accordion): fix unexpected routing
- Change anchor tag to `div` to prevent anchor tag from triggering route change BREAKING CHANGE: This causes the cursor style to be removed from the heading - implement CSS on the `accordion-toggle` class accordingly Closes #4792
1 parent 0495ff0 commit df211bd

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/accordion/docs/demo.html

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<style>
2+
.accordion-toggle {
3+
cursor: pointer;
4+
}
5+
</style>
6+
17
<div ng-controller="AccordionDemoCtrl">
28
<script type="text/ng-template" id="group-template.html">
39
<div class="panel {{panelClass || 'panel-default'}}">

src/accordion/test/accordion.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ describe('uib-accordion', function() {
151151
var scope, $compile;
152152
var element, groups;
153153
var findGroupLink = function(index) {
154-
return groups.eq(index).find('a').eq(0);
154+
return groups.eq(index).find('.accordion-toggle').eq(0);
155155
};
156156
var findGroupBody = function(index) {
157157
return groups.eq(index).find('.panel-collapse').eq(0);

template/accordion/accordion-group.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="panel {{panelClass || 'panel-default'}}">
22
<div class="panel-heading" ng-keypress="toggleOpen($event)">
33
<h4 class="panel-title">
4-
<a href tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span ng-class="{'text-muted': isDisabled}">{{heading}}</span></a>
4+
<div tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span ng-class="{'text-muted': isDisabled}">{{heading}}</span></div>
55
</h4>
66
</div>
77
<div class="panel-collapse collapse" uib-collapse="!isOpen">

0 commit comments

Comments
 (0)