mirror of
https://github.com/jasny/bootstrap.git
synced 2026-04-24 03:00:49 -04:00
Bind to document instead of 'body'
As per twitter#5308
This commit is contained in:
20
js/bootstrap-fileupload.js
vendored
20
js/bootstrap-fileupload.js
vendored
@@ -154,18 +154,16 @@
|
||||
/* FILEUPLOAD DATA-API
|
||||
* ================== */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.fileupload.data-api', '[data-provides="fileupload"]', function (e) {
|
||||
var $this = $(this)
|
||||
if ($this.data('fileupload')) return
|
||||
$this.fileupload($this.data())
|
||||
$(document).on('click.fileupload.data-api', '[data-provides="fileupload"]', function (e) {
|
||||
var $this = $(this)
|
||||
if ($this.data('fileupload')) return
|
||||
$this.fileupload($this.data())
|
||||
|
||||
var $target = $(e.target).closest('[data-dismiss="fileupload"],[data-trigger="fileupload"]');
|
||||
if ($target.length > 0) {
|
||||
$target.trigger('click.fileupload')
|
||||
e.preventDefault()
|
||||
}
|
||||
})
|
||||
var $target = $(e.target).closest('[data-dismiss="fileupload"],[data-trigger="fileupload"]');
|
||||
if ($target.length > 0) {
|
||||
$target.trigger('click.fileupload')
|
||||
e.preventDefault()
|
||||
}
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
|
||||
12
js/bootstrap-inputmask.js
vendored
12
js/bootstrap-inputmask.js
vendored
@@ -349,13 +349,11 @@
|
||||
/* INPUTMASK DATA-API
|
||||
* ================== */
|
||||
|
||||
$(function () {
|
||||
$(document).on('focus.inputmask.data-api', '[data-mask]', function (e) {
|
||||
var $this = $(this)
|
||||
if ($this.data('inputmask')) return
|
||||
e.preventDefault()
|
||||
$this.inputmask($this.data())
|
||||
})
|
||||
$(document).on('focus.inputmask.data-api', '[data-mask]', function (e) {
|
||||
var $this = $(this)
|
||||
if ($this.data('inputmask')) return
|
||||
e.preventDefault()
|
||||
$this.inputmask($this.data())
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
|
||||
Reference in New Issue
Block a user