Fix context menu position on the right window side (#5760)

* Fix context menu position on the right window side

* Update CHANGELOG.md (#5760)

Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
This commit is contained in:
Yuriy Bakhtin 2022-06-15 12:21:39 +03:00 committed by GitHub
parent 8e9fdf214d
commit 9736bdeea5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -7,8 +7,10 @@ HumHub Changelog
- Fix #5734: Fix error message when uninstall module and module folder is not writable
- Fix #5740: Fix logout action on force change password
- Fix #5735: OEmbed migration might fail with more complex Endpoint URLs
- Fix #5760: Fix context menu position on the right window side
- Fix #5759: Fix tests on enable space module
1.11.2 (May 30, 2022)
---------------------
- Fix: #5652: Fix undefined UrlOembed provider pattern

View File

@ -380,8 +380,9 @@ humhub.module('ui.additions', function (module, require, $) {
settings.menuSelected.call(this, $invokedOn, $selectedMenu, e);
});
if ($menu.position().left + $menu.outerWidth() > $(window).width()) {
$menu.css('left', $(window).outerWidth() - $menu.width() - 5);
var menuShift = $menu.offset().left + $menu.outerWidth() - $(window).width();
if (menuShift > 0) {
$menu.css('left', $menu.position().left - menuShift - 5);
}
return false;