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
ed94976e
Unverified
Commit
ed94976e
authored
4 years ago
by
XhmikosR
Committed by
GitHub
4 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Use `textContent` instead of `innerText`. (#30462)
It's supported by all of our supported browsers.
parent
dec3ea6a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.eslintrc.json
+0
-1
.eslintrc.json
js/src/tooltip.js
+2
-2
js/src/tooltip.js
js/tests/unit/tooltip.spec.js
+1
-1
js/tests/unit/tooltip.spec.js
with
3 additions
and
4 deletions
+3
-4
.eslintrc.json
+
0
-
1
View file @
ed94976e
...
...
@@ -48,7 +48,6 @@
"unicorn/prefer-number-properties"
:
"off"
,
"unicorn/prefer-query-selector"
:
"off"
,
"unicorn/prefer-set-has"
:
"off"
,
"unicorn/prefer-text-content"
:
"off"
,
"unicorn/prevent-abbreviations"
:
"off"
}
}
This diff is collapsed.
Click to expand it.
js/src/tooltip.js
+
2
-
2
View file @
ed94976e
...
...
@@ -421,7 +421,7 @@ class Tooltip {
element
.
appendChild
(
content
)
}
}
else
{
element
.
innerTex
t
=
content
.
textContent
element
.
textConten
t
=
content
.
textContent
}
return
...
...
@@ -434,7 +434,7 @@ class Tooltip {
element
.
innerHTML
=
content
}
else
{
element
.
innerTex
t
=
content
element
.
textConten
t
=
content
}
}
...
...
This diff is collapsed.
Click to expand it.
js/tests/unit/tooltip.spec.js
+
1
-
1
View file @
ed94976e
...
...
@@ -913,7 +913,7 @@ describe('Tooltip', () => {
tooltip
.
setElementContent
(
tooltip
.
getTipElement
(),
'
test
'
)
expect
(
tooltip
.
getTipElement
().
innerTex
t
).
toEqual
(
'
test
'
)
expect
(
tooltip
.
getTipElement
().
textConten
t
).
toEqual
(
'
test
'
)
})
})
...
...
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