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
9aad9a41
Commit
9aad9a41
authored
10 years ago
by
Chris Rebert
Browse files
Options
Download
Plain Diff
Merge pull request #16024 from twbs/unnecessary-parsing
avoid unnecessary HTML string building+parsing
parents
cb4144af
a14665e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
js/dropdown.js
+4
-1
js/dropdown.js
js/modal.js
+2
-1
js/modal.js
with
6 additions
and
2 deletions
+6
-2
js/dropdown.js
+
4
-
1
View file @
9aad9a41
...
...
@@ -34,7 +34,10 @@
if
(
!
isActive
)
{
if
(
'
ontouchstart
'
in
document
.
documentElement
&&
!
$parent
.
closest
(
'
.navbar-nav
'
).
length
)
{
// if mobile we use a backdrop because click events don't delegate
$
(
'
<div class="dropdown-backdrop"/>
'
).
insertAfter
(
$
(
this
)).
on
(
'
click
'
,
clearMenus
)
$
(
document
.
createElement
(
'
div
'
))
.
addClass
(
'
dropdown-backdrop
'
)
.
insertAfter
(
$
(
this
))
.
on
(
'
click
'
,
clearMenus
)
}
var
relatedTarget
=
{
relatedTarget
:
this
}
...
...
This diff is collapsed.
Click to expand it.
js/modal.js
+
2
-
1
View file @
9aad9a41
...
...
@@ -190,7 +190,8 @@
if
(
this
.
isShown
&&
this
.
options
.
backdrop
)
{
var
doAnimate
=
$
.
support
.
transition
&&
animate
this
.
$backdrop
=
$
(
'
<div class="modal-backdrop
'
+
animate
+
'
" />
'
)
this
.
$backdrop
=
$
(
document
.
createElement
(
'
div
'
))
.
addClass
(
'
modal-backdrop
'
+
animate
)
.
appendTo
(
this
.
$body
)
this
.
$element
.
on
(
'
click.dismiss.bs.modal
'
,
$
.
proxy
(
function
(
e
)
{
...
...
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