Browse Source

Fixes #98: Fixed `yii\bootstrap\ButtonDropdown` setting `href` attribute for non `a` tags

tags/2.0.6
Agiel Kurniawan Saputra 9 years ago committed by Alexander Makarov
parent
commit
e7b4df436f
  1. 2
      ButtonDropdown.php
  2. 2
      CHANGELOG.md

2
ButtonDropdown.php

@ -113,7 +113,7 @@ class ButtonDropdown extends Widget
} else { } else {
$label .= ' <span class="caret"></span>'; $label .= ' <span class="caret"></span>';
$options = $this->options; $options = $this->options;
if (!isset($options['href'])) { if (!isset($options['href']) && $this->tagName === 'a') {
$options['href'] = '#'; $options['href'] = '#';
} }
Html::addCssClass($options, ['toggle' => 'dropdown-toggle']); Html::addCssClass($options, ['toggle' => 'dropdown-toggle']);

2
CHANGELOG.md

@ -4,7 +4,7 @@ Yii Framework 2 bootstrap extension Change Log
2.0.6 under development 2.0.6 under development
----------------------- -----------------------
- Bug #98: Fixed `yii\bootstrap\ButtonDropdown` setting `href` attribute for non `a` tags (13nightevil)
2.0.5 September 23, 2015 2.0.5 September 23, 2015
------------------------ ------------------------

Loading…
Cancel
Save