bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

data-toggle not working in 0.12.0 version

Open jintoppy opened this issue 12 years ago • 7 comments

I upgraded AngularJS to 1.3 and bootstrap to 0.12.0. Now, the data-toggle is not working. It is not throwing any error also.

Given below is the sample HTML.

http://plnkr.co/edit/rwna6h9vubWVI7SHGcqH?p=preview

<div class="btn-group dropup error-display">
        <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"
        type="button"><span class="item-error ng-binding">Name is
        required.</span> <span class="caret caret-reversed"></span></button>

        <ul class="dropdown-menu">
            <li class="errorFieldset ng-binding">Field Errors:</li>

            <li>
                <!-- ngRepeat: d in errData --><a class=
                "ng-binding ng-scope"><span class="fa fa-times-circle" style=
                "font-style: italic"></span>Name is required.</a>
                <!-- end ngRepeat: d in errData --><a class=
                "ng-binding ng-scope"><span class="fa fa-times-circle" style=
                "font-style: italic"></span>Company is required</a>
                <!-- end ngRepeat: d in errData --><a class=
            </li>
        </ul>
    </div>

Thanks

jintoppy avatar Nov 29 '14 07:11 jintoppy

I confirm the problem. The dropdown fails silently with AngularJS 1.3 and angular-ui.bootstrap 0.12.0 .

dapids avatar Dec 02 '14 14:12 dapids

I'm having the same problem

Abrissirba avatar Dec 05 '14 09:12 Abrissirba

same problem with AngularJS v1.2.27 and angular-ui-bootstrap 0.12.0 data-toggle was working fine in 0.10.0

rdtsai avatar Dec 05 '14 19:12 rdtsai

Here as well, going back to 0.11.2 and 1.2.27 still works

jettro avatar Dec 05 '14 21:12 jettro

Anyone found a workaround?

Adding both

  <button class="btn dropdown-toggle" dropdown-toggle type="button">

class and dropdown-toggle helped for me.

SlyNet avatar Dec 10 '14 10:12 SlyNet

In version 0.12, There are 2 directives for the dropdown functionality:

  1. dropdown
  2. dropdown-toggle

and they both are restricted to 'attribute'. They are NOT class directive. Having class="dropdown" and class="dropdown-toggle" will not work. It is not a bug, but a breaking change with respect to earlier releases.

In version 0.10: https://github.com/angular-ui/bootstrap/blob/0.10.0/src/dropdownToggle/dropdownToggle.js there was only 1 directive 'dropdown-toggle' which was restricted to 'attribute' or 'class'

See this commit https://github.com/angular-ui/bootstrap/commit/192768e109b5c4a50c7dcd320e09d05fedd4298a for more info.

This issue should be closed.

antoinepairet avatar Dec 10 '14 13:12 antoinepairet

Thanks @antoinepairet for the clarification

jintoppy avatar Dec 12 '14 02:12 jintoppy