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
c86b74fe
Commit
c86b74fe
authored
4 years ago
by
XhmikosR
Browse files
Options
Download
Email Patches
Plain Diff
Unbreak lines and remove a TODO comment
parent
be189579
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
js/src/button.js
+3
-7
js/src/button.js
js/src/modal.js
+1
-2
js/src/modal.js
js/src/util.js
+0
-1
js/src/util.js
with
4 additions
and
10 deletions
+4
-10
js/src/button.js
+
3
-
7
View file @
c86b74fe
...
...
@@ -59,17 +59,14 @@ class Button {
toggle
()
{
let
triggerChangeEvent
=
true
let
addAriaPressed
=
true
const
rootElement
=
$
(
this
.
_element
).
closest
(
SELECTOR_DATA_TOGGLES
)[
0
]
const
rootElement
=
$
(
this
.
_element
).
closest
(
SELECTOR_DATA_TOGGLES
)[
0
]
if
(
rootElement
)
{
const
input
=
this
.
_element
.
querySelector
(
SELECTOR_INPUT
)
if
(
input
)
{
if
(
input
.
type
===
'
radio
'
)
{
if
(
input
.
checked
&&
this
.
_element
.
classList
.
contains
(
CLASS_NAME_ACTIVE
))
{
if
(
input
.
checked
&&
this
.
_element
.
classList
.
contains
(
CLASS_NAME_ACTIVE
))
{
triggerChangeEvent
=
false
}
else
{
const
activeElement
=
rootElement
.
querySelector
(
SELECTOR_ACTIVE
)
...
...
@@ -96,8 +93,7 @@ class Button {
if
(
!
(
this
.
_element
.
hasAttribute
(
'
disabled
'
)
||
this
.
_element
.
classList
.
contains
(
'
disabled
'
)))
{
if
(
addAriaPressed
)
{
this
.
_element
.
setAttribute
(
'
aria-pressed
'
,
!
this
.
_element
.
classList
.
contains
(
CLASS_NAME_ACTIVE
))
this
.
_element
.
setAttribute
(
'
aria-pressed
'
,
!
this
.
_element
.
classList
.
contains
(
CLASS_NAME_ACTIVE
))
}
if
(
triggerChangeEvent
)
{
...
...
This diff is collapsed.
Click to expand it.
js/src/modal.js
+
1
-
2
View file @
c86b74fe
...
...
@@ -453,8 +453,7 @@ class Modal {
// ----------------------------------------------------------------------
_adjustDialog
()
{
const
isModalOverflowing
=
this
.
_element
.
scrollHeight
>
document
.
documentElement
.
clientHeight
const
isModalOverflowing
=
this
.
_element
.
scrollHeight
>
document
.
documentElement
.
clientHeight
if
(
!
this
.
_isBodyOverflowing
&&
isModalOverflowing
)
{
this
.
_element
.
style
.
paddingLeft
=
`
${
this
.
_scrollbarWidth
}
px`
...
...
This diff is collapsed.
Click to expand it.
js/src/util.js
+
0
-
1
View file @
c86b74fe
...
...
@@ -125,7 +125,6 @@ const Util = {
$
(
element
).
trigger
(
TRANSITION_END
)
},
// TODO: Remove in v5
supportsTransitionEnd
()
{
return
Boolean
(
TRANSITION_END
)
},
...
...
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