Commit 3074737d authored by billy gates's avatar billy gates

Merge pull request #5549 from mfansler/2.1.2-wip

fixes #5336: reorder focus() call to avoid scrolling
parents e0a007b9 e24b46b7
...@@ -70,13 +70,12 @@ ...@@ -70,13 +70,12 @@
that.$element that.$element
.addClass('in') .addClass('in')
.attr('aria-hidden', false) .attr('aria-hidden', false)
.focus()
that.enforceFocus() that.enforceFocus()
transition ? transition ?
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
that.$element.trigger('shown') that.$element.focus().trigger('shown')
}) })
} }
...@@ -232,4 +231,4 @@ ...@@ -232,4 +231,4 @@
}) })
}) })
}(window.jQuery); }(window.jQuery);
\ No newline at end of file
...@@ -794,13 +794,12 @@ ...@@ -794,13 +794,12 @@
that.$element that.$element
.addClass('in') .addClass('in')
.attr('aria-hidden', false) .attr('aria-hidden', false)
.focus()
that.enforceFocus() that.enforceFocus()
transition ? transition ?
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
that.$element.trigger('shown') that.$element.focus().trigger('shown')
}) })
} }
...@@ -956,7 +955,8 @@ ...@@ -956,7 +955,8 @@
}) })
}) })
}(window.jQuery);/* =========================================================== }(window.jQuery);
/* ===========================================================
* bootstrap-tooltip.js v2.1.2 * bootstrap-tooltip.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#tooltips * http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame * Inspired by the original jQuery.tipsy by Jason Frame
......
This diff is collapsed.
...@@ -70,13 +70,12 @@ ...@@ -70,13 +70,12 @@
that.$element that.$element
.addClass('in') .addClass('in')
.attr('aria-hidden', false) .attr('aria-hidden', false)
.focus()
that.enforceFocus() that.enforceFocus()
transition ? transition ?
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
that.$element.trigger('shown') that.$element.focus().trigger('shown')
}) })
} }
...@@ -232,4 +231,4 @@ ...@@ -232,4 +231,4 @@
}) })
}) })
}(window.jQuery); }(window.jQuery);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment