.toggleClass('open')
.trigger('shown.bs.dropdown', relatedTarget)
- $this.focus()
+ $this.trigger('focus')
}
return false
var isActive = $parent.hasClass('open')
if (!isActive || (isActive && e.keyCode == 27)) {
- if (e.which == 27) $parent.find(toggle).focus()
- return $this.click()
+ if (e.which == 27) $parent.find(toggle).trigger('focus')
+ return $this.trigger('click')
}
var desc = ' li:not(.divider):visible a'
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0
- $items.eq(index).focus()
+ $items.eq(index).trigger('focus')
}
function clearMenus(e) {
transition ?
that.$element.find('.modal-dialog') // wait for modal to slide in
.one($.support.transition.end, function () {
- that.$element.focus().trigger(e)
+ that.$element.trigger('focus').trigger(e)
})
.emulateTransitionEnd(300) :
- that.$element.focus().trigger(e)
+ that.$element.trigger('focus').trigger(e)
})
}
.off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', $.proxy(function (e) {
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
- this.$element.focus()
+ this.$element.trigger('focus')
}
}, this))
}
$target
.modal(option, this)
.one('hide', function () {
- $this.is(':visible') && $this.focus()
+ $this.is(':visible') && $this.trigger('focus')
})
})
.toggleClass('open')
.trigger('shown.bs.dropdown', relatedTarget)
- $this.focus()
+ $this.trigger('focus')
}
return false
var isActive = $parent.hasClass('open')
if (!isActive || (isActive && e.keyCode == 27)) {
- if (e.which == 27) $parent.find(toggle).focus()
- return $this.click()
+ if (e.which == 27) $parent.find(toggle).trigger('focus')
+ return $this.trigger('click')
}
var desc = ' li:not(.divider):visible a'
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0
- $items.eq(index).focus()
+ $items.eq(index).trigger('focus')
}
function clearMenus(e) {
transition ?
that.$element.find('.modal-dialog') // wait for modal to slide in
.one($.support.transition.end, function () {
- that.$element.focus().trigger(e)
+ that.$element.trigger('focus').trigger(e)
})
.emulateTransitionEnd(300) :
- that.$element.focus().trigger(e)
+ that.$element.trigger('focus').trigger(e)
})
}
.off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', $.proxy(function (e) {
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
- this.$element.focus()
+ this.$element.trigger('focus')
}
}, this))
}
$target
.modal(option, this)
.one('hide', function () {
- $this.is(':visible') && $this.focus()
+ $this.is(':visible') && $this.trigger('focus')
})
})