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:
-
configure a CListView with updateSelector=>‘a.inDropdow’ where a.inDropdown is a link within a bootstrap dropdown
-
click on the link a.inDropdown within the drop down
-
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.