Commit 3de3dac0 authored by Chris Rebert's avatar Chris Rebert

Merge pull request #17330 from twbs/vejersele-bugfix/innerText

Rebased & tweaked version of #17272
parents 6d42a230 54c4eb95
......@@ -116,12 +116,12 @@ const Popover = (($) => {
let tip = this.getTipElement()
let title = this.getTitle()
let content = this._getContent()
let titleElement = $(tip).find(Selector.TITLE)[0]
let $titleElement = $(tip).find(Selector.TITLE)
if (titleElement) {
titleElement[
this.config.html ? 'innerHTML' : 'innerText'
] = title
if ($titleElement) {
$titleElement[
this.config.html ? 'html' : 'text'
](title)
}
// we use append for html objects to maintain js events
......
......@@ -358,9 +358,9 @@ const Tooltip = (($) => {
setContent() {
let tip = this.getTipElement()
let title = this.getTitle()
let method = this.config.html ? 'innerHTML' : 'innerText'
let method = this.config.html ? 'html' : 'text'
$(tip).find(Selector.TOOLTIP_INNER)[0][method] = title
$(tip).find(Selector.TOOLTIP_INNER)[method](title)
$(tip)
.removeClass(ClassName.FADE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment