mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 08:26:01 +00:00
#94 fixed dropdown menu placement in small window
This commit is contained in:
@@ -16,9 +16,17 @@
|
||||
|
||||
if (offset.left + width > window.innerWidth) {
|
||||
newLeft = offset.left - width;
|
||||
|
||||
if (newLeft < 0) newLeft = 0;
|
||||
}
|
||||
|
||||
if (offset.top + height > window.innerHeight) {
|
||||
newTop = offset.top - height;
|
||||
|
||||
if (newTop < 0) newTop = 0;
|
||||
if (newTop + height > window.innerHeight) {
|
||||
element.style.height = `${window.innerHeight - newTop}px`;
|
||||
}
|
||||
}
|
||||
|
||||
if (newLeft != null) element.style.left = `${newLeft}px`;
|
||||
@@ -115,6 +123,7 @@
|
||||
z-index: 1050;
|
||||
cursor: default;
|
||||
white-space: nowrap;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.keyText {
|
||||
|
||||
Reference in New Issue
Block a user