Skip to content

Commit

Permalink
Dropdown improvement: now when the button caret is clicked it won't s…
Browse files Browse the repository at this point in the history
…croll page to top.
  • Loading branch information
thednp committed Oct 26, 2016
1 parent dc34411 commit c65de8e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/bootstrap-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@
this.handle = function(e) { // fix some Safari bug with <button>
var target = e.target || e.currentTarget,
children = [], c = self.menu.parentNode.getElementsByTagName('*');
/\#$/g.test(target.href) && e.preventDefault();
(/\#$/g.test(target.href) || /\#$/g.test(target.parentNode.href)) && e.preventDefault();

for ( var i=0, l = c.length||0; i<l; i++) { l && children.push(c[i]); }
if ( target === self.menu || target.parentNode === self.menu || target.parentNode.parentNode === self.menu ) {
Expand Down
Loading

0 comments on commit c65de8e

Please sign in to comment.