mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-08 09:14:10 +01:00
Stop send mouse clicks while dragging in view only
This commit is contained in:
parent
5a81223d96
commit
8a8fa1d906
@ -903,6 +903,8 @@ export default class RFB extends EventTargetMixin {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._viewOnly) { return; }
|
||||
|
||||
// Otherwise we treat this as a mouse click event.
|
||||
// Send the button down event here, as the button up
|
||||
// event is sent at the end of this function.
|
||||
|
@ -514,6 +514,13 @@ describe('Remote Frame Buffer Protocol Client', function () {
|
||||
expect(RFB.messages.pointerEvent).to.have.been.calledTwice;
|
||||
});
|
||||
|
||||
it('should not send button messages when in view only', function () {
|
||||
client._viewOnly = true;
|
||||
client._handleMouseButton(13, 9, 0x001);
|
||||
client._handleMouseButton(13, 9, 0x000);
|
||||
expect(RFB.messages.pointerEvent).to.not.have.been.called;
|
||||
});
|
||||
|
||||
it('should send button message directly when drag is disabled', function () {
|
||||
client.dragViewport = false;
|
||||
client._handleMouseButton(13, 9, 0x001);
|
||||
|
Loading…
Reference in New Issue
Block a user