Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Search] Fix for hidden menu in search result #1712

Merged
merged 1 commit into from
Oct 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions application/views/interface_assets/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,37 @@ function getLookupResult() {
$(function () {
$('[data-toggle="tooltip"]').tooltip()
});

$(function () {
// hold onto the drop down menu
var dropdownMenu;

// and when you show it, move it to the body
$(window).on('show.bs.dropdown', function (e) {

// grab the menu
dropdownMenu = $(e.target).find('.dropdown-menu');

// detach it and append it to the body
$('body').append(dropdownMenu.detach());

// grab the new offset position
var eOffset = $(e.target).offset();

// make sure to place it where it would normally go (this could be improved)
dropdownMenu.css({
'display': 'block',
'top': eOffset.top + $(e.target).outerHeight(),
'left': eOffset.left
});
});

// and when you hide it, reattach the drop down, and hide it normally
$(window).on('hide.bs.dropdown', function (e) {
$(e.target).append(dropdownMenu.detach());
dropdownMenu.hide();
});
})();
</script>
<script type="text/javascript">
i=0;
Expand Down