Avoid scrolling on RFB object focus
Chrome scrolls the view to show as much as possible of the canvas when we call focus(), which is likely not the desired behaviour. This also exposes the ability to pass on future options when focusing the RFB object manually.
This commit is contained in:
@@ -392,6 +392,13 @@ describe('Remote Frame Buffer Protocol Client', function () {
|
||||
client.focus();
|
||||
expect(client._canvas.focus).to.have.been.calledOnce;
|
||||
});
|
||||
|
||||
it('should include focus options', function () {
|
||||
client._canvas.focus = sinon.spy();
|
||||
client.focus({ foobar: 12, gazonk: true });
|
||||
expect(client._canvas.focus).to.have.been.calledOnce;
|
||||
expect(client._canvas.focus).to.have.been.calledWith({ foobar: 12, gazonk: true});
|
||||
});
|
||||
});
|
||||
|
||||
describe('#blur', function () {
|
||||
|
||||
Reference in New Issue
Block a user