Listview Ajaxupdate And Bootstrap Dropdown

Note: this is not really a yii bug, more a Bootstrap bug, but I think it’s hard to expect that bootstrap will change. I wanted to report this FYI.

Boostrap dropdown intercepts a click event on ‘html’ and stops the event.

I recently asked on stackoverflow about this, but with no success:

http://stackoverflow.com/questions/12492574/why-does-bootstrap-bind-events-on-html

Because of this, the following procedure won’t work:

  1. configure a CListView with updateSelector=>‘a.inDropdow’ where a.inDropdown is a link within a bootstrap dropdown

  2. click on the link a.inDropdown within the drop down

  3. expected result: ajaxUpdate, actual result: redirect to another page

Solution: bind the click event on ‘body’, i.e. in jquery.yiilistview.js:35

— $(document).on(‘click.yiiListView’, settings.updateSelector,function(){

+++ $(‘body’).on(‘click.yiiListView’, settings.updateSelector,function(){

Best, E.

why not post it to the bootstrap topic bootstrap discussion

:lol:

[color="#006400"]/* Moved from Bugs to Extensions … */[/color]