mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
popovers: Use fix_positions option for streams popover.
The fix_positions argument here fixes the horizontal position of the stream popover. It also fixes the vertical position, both in the default case, and also doing an appropriate adjustment for the case that the color picker is open. This contains a few changes by tabbott to, rather than hiding the arrow unconditionally, only do so when it would no longer point at the right part of the screen. Fixes #2374. Fixes #6059. Fixes #7290.
This commit is contained in:
11
static/third/bootstrap/js/bootstrap.js
vendored
11
static/third/bootstrap/js/bootstrap.js
vendored
@@ -1289,14 +1289,21 @@
|
||||
*/
|
||||
if (top < 0) {
|
||||
top = 0;
|
||||
} else if (top + actualHeight > win_height) {
|
||||
top = win_height - actualHeight;
|
||||
$tip.find("div.arrow").hide();
|
||||
} else if (top + actualHeight > win_height - 20) {
|
||||
top = win_height - actualHeight - 20;
|
||||
if (top < 0) {
|
||||
top = 0;
|
||||
}
|
||||
$tip.find("div.arrow").hide();
|
||||
}
|
||||
|
||||
if (left < 0) {
|
||||
left = 0;
|
||||
$tip.find("div.arrow").hide();
|
||||
} else if (left + actualWidth > win_width) {
|
||||
left = win_width - actualWidth;
|
||||
$tip.find("div.arrow").hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user