Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
f5ce6617
Commit
f5ce6617
authored
11 years ago
by
fat
Browse files
Options
Download
Email Patches
Plain Diff
fix event binding in modal.js
parent
a7a87c8e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/assets/js/bootstrap.js
+7
-7
docs/assets/js/bootstrap.js
docs/assets/js/bootstrap.min.js
+1
-1
docs/assets/js/bootstrap.min.js
js/modal.js
+7
-7
js/modal.js
with
15 additions
and
15 deletions
+15
-15
docs/assets/js/bootstrap.js
+
7
-
7
View file @
f5ce6617
...
@@ -872,18 +872,18 @@
...
@@ -872,18 +872,18 @@
Modal
.
prototype
.
enforceFocus
=
function
()
{
Modal
.
prototype
.
enforceFocus
=
function
()
{
$
(
document
)
$
(
document
)
.
off
(
'
focusin.bs.modal
'
)
// guard against infinite focus loop
.
off
(
'
focusin.bs.modal
'
)
// guard against infinite focus loop
.
on
(
'
focusin.bs.modal
'
,
function
(
e
)
{
.
on
(
'
focusin.bs.modal
'
,
$
.
proxy
(
function
(
e
)
{
if
(
this
.
$element
[
0
]
!==
e
.
target
&&
!
this
.
$element
.
has
(
e
.
target
).
length
)
{
if
(
this
.
$element
[
0
]
!==
e
.
target
&&
!
this
.
$element
.
has
(
e
.
target
).
length
)
{
this
.
$element
.
focus
()
this
.
$element
.
focus
()
}
}
},
this
)
},
this
)
)
}
}
Modal
.
prototype
.
escape
=
function
()
{
Modal
.
prototype
.
escape
=
function
()
{
if
(
this
.
isShown
&&
this
.
options
.
keyboard
)
{
if
(
this
.
isShown
&&
this
.
options
.
keyboard
)
{
this
.
$element
.
on
(
'
keyup.dismiss.bs.modal
'
,
function
(
e
)
{
this
.
$element
.
on
(
'
keyup.dismiss.bs.modal
'
,
$
.
proxy
(
function
(
e
)
{
e
.
which
==
27
&&
this
.
hide
()
e
.
which
==
27
&&
this
.
hide
()
},
this
)
},
this
)
)
}
else
if
(
!
this
.
isShown
)
{
}
else
if
(
!
this
.
isShown
)
{
this
.
$element
.
off
(
'
keyup.dismiss.bs.modal
'
)
this
.
$element
.
off
(
'
keyup.dismiss.bs.modal
'
)
}
}
...
...
This diff is collapsed.
Click to expand it.
docs/assets/js/bootstrap.min.js
+
1
-
1
View file @
f5ce6617
This diff is collapsed.
Click to expand it.
js/modal.js
+
7
-
7
View file @
f5ce6617
...
@@ -106,18 +106,18 @@
...
@@ -106,18 +106,18 @@
Modal
.
prototype
.
enforceFocus
=
function
()
{
Modal
.
prototype
.
enforceFocus
=
function
()
{
$
(
document
)
$
(
document
)
.
off
(
'
focusin.bs.modal
'
)
// guard against infinite focus loop
.
off
(
'
focusin.bs.modal
'
)
// guard against infinite focus loop
.
on
(
'
focusin.bs.modal
'
,
function
(
e
)
{
.
on
(
'
focusin.bs.modal
'
,
$
.
proxy
(
function
(
e
)
{
if
(
this
.
$element
[
0
]
!==
e
.
target
&&
!
this
.
$element
.
has
(
e
.
target
).
length
)
{
if
(
this
.
$element
[
0
]
!==
e
.
target
&&
!
this
.
$element
.
has
(
e
.
target
).
length
)
{
this
.
$element
.
focus
()
this
.
$element
.
focus
()
}
}
},
this
)
},
this
)
)
}
}
Modal
.
prototype
.
escape
=
function
()
{
Modal
.
prototype
.
escape
=
function
()
{
if
(
this
.
isShown
&&
this
.
options
.
keyboard
)
{
if
(
this
.
isShown
&&
this
.
options
.
keyboard
)
{
this
.
$element
.
on
(
'
keyup.dismiss.bs.modal
'
,
function
(
e
)
{
this
.
$element
.
on
(
'
keyup.dismiss.bs.modal
'
,
$
.
proxy
(
function
(
e
)
{
e
.
which
==
27
&&
this
.
hide
()
e
.
which
==
27
&&
this
.
hide
()
},
this
)
},
this
)
)
}
else
if
(
!
this
.
isShown
)
{
}
else
if
(
!
this
.
isShown
)
{
this
.
$element
.
off
(
'
keyup.dismiss.bs.modal
'
)
this
.
$element
.
off
(
'
keyup.dismiss.bs.modal
'
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment