diff --git a/ButtonDropdown.php b/ButtonDropdown.php index 1a379d7..5993217 100644 --- a/ButtonDropdown.php +++ b/ButtonDropdown.php @@ -113,7 +113,7 @@ class ButtonDropdown extends Widget } else { $label .= ' '; $options = $this->options; - if (!isset($options['href'])) { + if (!isset($options['href']) && $this->tagName === 'a') { $options['href'] = '#'; } Html::addCssClass($options, ['toggle' => 'dropdown-toggle']); diff --git a/CHANGELOG.md b/CHANGELOG.md index c724ab7..902d877 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Yii Framework 2 bootstrap extension Change Log 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 ------------------------