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

fix(accordion): fix unexpected routing #4792

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/accordion/docs/demo.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<style>
.accordion-toggle {
cursor: pointer;
}
</style>

<div ng-controller="AccordionDemoCtrl">
<script type="text/ng-template" id="group-template.html">
<div class="panel {{panelClass || 'panel-default'}}">
Expand Down
2 changes: 1 addition & 1 deletion src/accordion/test/accordion.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ describe('uib-accordion', function() {
var scope, $compile;
var element, groups;
var findGroupLink = function(index) {
return groups.eq(index).find('a').eq(0);
return groups.eq(index).find('.accordion-toggle').eq(0);
};
var findGroupBody = function(index) {
return groups.eq(index).find('.panel-collapse').eq(0);
Expand Down
2 changes: 1 addition & 1 deletion template/accordion/accordion-group.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="panel {{panelClass || 'panel-default'}}">
<div class="panel-heading" ng-keypress="toggleOpen($event)">
<h4 class="panel-title">
<a href tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span ng-class="{'text-muted': isDisabled}">{{heading}}</span></a>
<div tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span ng-class="{'text-muted': isDisabled}">{{heading}}</span></div>
</h4>
</div>
<div class="panel-collapse collapse" uib-collapse="!isOpen">
Expand Down