Commit e7b4df43 authored by Agiel Kurniawan Saputra's avatar Agiel Kurniawan Saputra Committed by Alexander Makarov

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

parent 3b792412
...@@ -113,7 +113,7 @@ class ButtonDropdown extends Widget ...@@ -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']);
......
...@@ -4,7 +4,7 @@ Yii Framework 2 bootstrap extension Change Log ...@@ -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
------------------------ ------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment