mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Merge pull request #17330 from twbs/vejersele-bugfix/innerText
Rebased & tweaked version of #17272
This commit is contained in:
commit
3de3dac0b0
2 changed files with 7 additions and 7 deletions
|
@ -116,12 +116,12 @@ const Popover = (($) => {
|
||||||
let tip = this.getTipElement()
|
let tip = this.getTipElement()
|
||||||
let title = this.getTitle()
|
let title = this.getTitle()
|
||||||
let content = this._getContent()
|
let content = this._getContent()
|
||||||
let titleElement = $(tip).find(Selector.TITLE)[0]
|
let $titleElement = $(tip).find(Selector.TITLE)
|
||||||
|
|
||||||
if (titleElement) {
|
if ($titleElement) {
|
||||||
titleElement[
|
$titleElement[
|
||||||
this.config.html ? 'innerHTML' : 'innerText'
|
this.config.html ? 'html' : 'text'
|
||||||
] = title
|
](title)
|
||||||
}
|
}
|
||||||
|
|
||||||
// we use append for html objects to maintain js events
|
// we use append for html objects to maintain js events
|
||||||
|
|
|
@ -358,9 +358,9 @@ const Tooltip = (($) => {
|
||||||
setContent() {
|
setContent() {
|
||||||
let tip = this.getTipElement()
|
let tip = this.getTipElement()
|
||||||
let title = this.getTitle()
|
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)
|
$(tip)
|
||||||
.removeClass(ClassName.FADE)
|
.removeClass(ClassName.FADE)
|
||||||
|
|
Loading…
Add table
Reference in a new issue