summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-09-05 09:26:40 +0200
committerAlexis Reigel <mail@koffeinfrei.org>2017-09-05 12:18:35 +0200
commitae600b80f9cbad19dc3c2592d044c233e7d27073 (patch)
tree3e479f6206ba2d436fd59f7271e74c4268e186c5
parenta6509d5a8dd5ed9dd85f7adbebc5daaf6507b85a (diff)
downloadgitlab-ce-ae600b80f9cbad19dc3c2592d044c233e7d27073.tar.gz
set the popover's viewport to the main content
the position of the popover is correctly calculated and positioned to the bottom when the navigation would overlap the popover.
-rw-r--r--app/assets/javascripts/main.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js
index 69a6e131b59..e44903f8daa 100644
--- a/app/assets/javascripts/main.js
+++ b/app/assets/javascripts/main.js
@@ -249,7 +249,10 @@ $(function () {
// Initialize popovers
$body.popover({
selector: '[data-toggle="popover"]',
- trigger: 'focus'
+ trigger: 'focus',
+ // set the viewport to the main content, excluding the navigation bar, so
+ // the navigation can't overlap the popover
+ viewport: '.page-with-sidebar'
});
$('.trigger-submit').on('change', function () {
return $(this).parents('form').submit();