2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

fixes #5336: reorder focus() call to avoid scrolling

This commit is contained in:
mfansler
2012-10-16 12:27:43 -04:00
parent fa778792c5
commit e24b46b7f3
4 changed files with 12 additions and 18 deletions
+2 -3
View File
@@ -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')
}) })
} }
+4 -4
View File
@@ -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 @@
}) })
}) })
}(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
+2 -6
View File
File diff suppressed because one or more lines are too long
+2 -3
View File
@@ -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')
}) })
} }