Skip to content

Commit

Permalink
Merge pull request #5549 from mfansler/2.1.2-wip
Browse files Browse the repository at this point in the history
fixes #5336: reorder focus() call to avoid scrolling
  • Loading branch information
fat committed Oct 18, 2012
2 parents e0a007b + e24b46b commit 3074737
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
7 changes: 3 additions & 4 deletions docs/assets/js/bootstrap-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,12 @@
that.$element
.addClass('in')
.attr('aria-hidden', false)
.focus()

that.enforceFocus()

transition ?
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
that.$element.trigger('shown')
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
that.$element.focus().trigger('shown')

})
}
Expand Down Expand Up @@ -232,4 +231,4 @@
})
})

}(window.jQuery);
}(window.jQuery);
8 changes: 4 additions & 4 deletions docs/assets/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -794,13 +794,12 @@
that.$element
.addClass('in')
.attr('aria-hidden', false)
.focus()

that.enforceFocus()

transition ?
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
that.$element.trigger('shown')
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
that.$element.focus().trigger('shown')

})
}
Expand Down Expand Up @@ -956,7 +955,8 @@
})
})

}(window.jQuery);/* ===========================================================
}(window.jQuery);
/* ===========================================================
* bootstrap-tooltip.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
Expand Down
Loading

0 comments on commit 3074737

Please sign in to comment.