mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 17:36:27 +00:00
Add a fixed: option to bootstrap.popover and use it
(imported from commit fe8768b8a320df7670c204880bffb3932568cc5e)
This commit is contained in:
10
zephyr/static/third/bootstrap/js/bootstrap.js
vendored
10
zephyr/static/third/bootstrap/js/bootstrap.js
vendored
@@ -1221,6 +1221,7 @@
|
||||
, actualHeight
|
||||
, placement
|
||||
, tp
|
||||
, newtop
|
||||
|
||||
if (this.hasContent() && this.enabled) {
|
||||
$tip = this.tip()
|
||||
@@ -1261,6 +1262,14 @@
|
||||
break
|
||||
}
|
||||
|
||||
if (this.options.fixed) {
|
||||
// If using position: fixed, position relative to top of
|
||||
// viewport
|
||||
newtop = tp.top - $(document).scrollTop()
|
||||
tp = $.extend(tp, {top: newtop,
|
||||
position: 'fixed'})
|
||||
}
|
||||
|
||||
$tip
|
||||
.css(tp)
|
||||
.addClass(placement)
|
||||
@@ -1388,6 +1397,7 @@
|
||||
, title: ''
|
||||
, delay: 0
|
||||
, html: true
|
||||
, fixed: false
|
||||
}
|
||||
|
||||
}(window.jQuery);
|
||||
|
||||
Reference in New Issue
Block a user