mirror of
https://git.proxmox.com/git/mirror_novnc
synced 2025-08-06 13:37:56 +00:00
Add safety check in code for moving the handle
An element that has 'display: none' has a height of zero, and the logic for the handle assumed that this was never the case. This could cause the handle to end up at the wrong coordinates.
This commit is contained in:
parent
59cd99bc38
commit
f75e4d3caa
@ -556,6 +556,11 @@ var UI;
|
||||
.getBoundingClientRect();
|
||||
var margin = 10;
|
||||
|
||||
// These heights need to be non-zero for the below logic to work
|
||||
if (handleHeight === 0 || controlbarBounds.height === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
var newY = viewportRelativeY;
|
||||
|
||||
// Check if the coordinates are outside the control bar
|
||||
|
Loading…
Reference in New Issue
Block a user