Skip to content

Commit 5bf1391

Browse files
committed
fixes twbs#10658 jQuery Popover content loses bound events on second setContent call.
1 parent 6405442 commit 5bf1391

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

dist/js/bootstrap.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
14481448
var content = this.getContent()
14491449

14501450
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1451-
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
1451+
$tip.find('.popover-content')[ // we use append for html objects to maintain js events
1452+
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
1453+
](content)
14521454

14531455
$tip.removeClass('fade top bottom left right in')
14541456

0 commit comments

Comments
 (0)