summaryrefslogtreecommitdiffstats
path: root/web_src/js/features/repo-legacy.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/features/repo-legacy.js')
-rw-r--r--web_src/js/features/repo-legacy.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js
index 2e98a7183e..6692d1902c 100644
--- a/web_src/js/features/repo-legacy.js
+++ b/web_src/js/features/repo-legacy.js
@@ -267,10 +267,13 @@ export async function initRepository() {
// Commit statuses
$('.commit-statuses-trigger').each(function () {
+ const positionRight = $('.repository.file.list').length > 0 || $('.repository.diff').length > 0;
+ const popupPosition = positionRight ? 'right center' : 'left center';
$(this)
.popup({
on: 'click',
- position: ($('.repository.file.list').length > 0 ? 'right center' : 'left center'),
+ lastResort: popupPosition, // prevent error message "Popup does not fit within the boundaries of the viewport"
+ position: popupPosition,
});
});