Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
8cfbf693
Commit
8cfbf693
authored
7 years ago
by
Martijn Cuppens
Committed by
Johann-S
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Consistent usage of $(document.body) instead of $('body') (#25671)
parent
99379f38
3 merge requests
!28721
Hot test
,
!27561
Adds font-weight-medium to font weight classes
,
!17021
v4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
js/src/dropdown.js
+2
-2
js/src/dropdown.js
js/src/modal.js
+4
-4
js/src/modal.js
js/src/tooltip.js
+2
-2
js/src/tooltip.js
with
8 additions
and
8 deletions
+8
-8
js/src/dropdown.js
+
2
-
2
View file @
8cfbf693
...
...
@@ -183,7 +183,7 @@ const Dropdown = (($) => {
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if
(
'
ontouchstart
'
in
document
.
documentElement
&&
$
(
parent
).
closest
(
Selector
.
NAVBAR_NAV
).
length
===
0
)
{
$
(
'
body
'
).
children
().
on
(
'
mouseover
'
,
null
,
$
.
noop
)
$
(
document
.
body
).
children
().
on
(
'
mouseover
'
,
null
,
$
.
noop
)
}
this
.
_element
.
focus
()
...
...
@@ -365,7 +365,7 @@ const Dropdown = (($) => {
// If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if
(
'
ontouchstart
'
in
document
.
documentElement
)
{
$
(
'
body
'
).
children
().
off
(
'
mouseover
'
,
null
,
$
.
noop
)
$
(
document
.
body
).
children
().
off
(
'
mouseover
'
,
null
,
$
.
noop
)
}
toggles
[
i
].
setAttribute
(
'
aria-expanded
'
,
'
false
'
)
...
...
This diff is collapsed.
Click to expand it.
js/src/modal.js
+
4
-
4
View file @
8cfbf693
...
...
@@ -453,8 +453,8 @@ const Modal = (($) => {
// Adjust body padding
const
actualPadding
=
document
.
body
.
style
.
paddingRight
const
calculatedPadding
=
$
(
'
body
'
).
css
(
'
padding-right
'
)
$
(
'
body
'
).
data
(
'
padding-right
'
,
actualPadding
).
css
(
'
padding-right
'
,
`
${
parseFloat
(
calculatedPadding
)
+
this
.
_scrollbarWidth
}
px`
)
const
calculatedPadding
=
$
(
document
.
body
).
css
(
'
padding-right
'
)
$
(
document
.
body
).
data
(
'
padding-right
'
,
actualPadding
).
css
(
'
padding-right
'
,
`
${
parseFloat
(
calculatedPadding
)
+
this
.
_scrollbarWidth
}
px`
)
}
}
...
...
@@ -476,9 +476,9 @@ const Modal = (($) => {
})
// Restore body padding
const
padding
=
$
(
'
body
'
).
data
(
'
padding-right
'
)
const
padding
=
$
(
document
.
body
).
data
(
'
padding-right
'
)
if
(
typeof
padding
!==
'
undefined
'
)
{
$
(
'
body
'
).
css
(
'
padding-right
'
,
padding
).
removeData
(
'
padding-right
'
)
$
(
document
.
body
).
css
(
'
padding-right
'
,
padding
).
removeData
(
'
padding-right
'
)
}
}
...
...
This diff is collapsed.
Click to expand it.
js/src/tooltip.js
+
2
-
2
View file @
8cfbf693
...
...
@@ -317,7 +317,7 @@ const Tooltip = (($) => {
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if
(
'
ontouchstart
'
in
document
.
documentElement
)
{
$
(
'
body
'
).
children
().
on
(
'
mouseover
'
,
null
,
$
.
noop
)
$
(
document
.
body
).
children
().
on
(
'
mouseover
'
,
null
,
$
.
noop
)
}
const
complete
=
()
=>
{
...
...
@@ -375,7 +375,7 @@ const Tooltip = (($) => {
// If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if
(
'
ontouchstart
'
in
document
.
documentElement
)
{
$
(
'
body
'
).
children
().
off
(
'
mouseover
'
,
null
,
$
.
noop
)
$
(
document
.
body
).
children
().
off
(
'
mouseover
'
,
null
,
$
.
noop
)
}
this
.
_activeTrigger
[
Trigger
.
CLICK
]
=
false
...
...
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
Menu
Explore
Projects
Groups
Snippets