Let RFB object make sure canvas can have focus
Let's set up things properly ourselves instead of forcing everyone to create their canvas element just like we want it.
This commit is contained in:
parent
1150497123
commit
458086177c
|
|
@ -147,6 +147,11 @@ export default function RFB(defaults) {
|
||||||
// main setup
|
// main setup
|
||||||
Log.Debug(">> RFB.constructor");
|
Log.Debug(">> RFB.constructor");
|
||||||
|
|
||||||
|
// Target canvas must be able to have focus
|
||||||
|
if (!this._target.hasAttribute('tabindex')) {
|
||||||
|
this._target.tabIndex = -1;
|
||||||
|
}
|
||||||
|
|
||||||
// populate encHandlers with bound versions
|
// populate encHandlers with bound versions
|
||||||
this._encHandlers[encodings.encodingRaw] = RFB.encodingHandlers.RAW.bind(this);
|
this._encHandlers[encodings.encodingRaw] = RFB.encodingHandlers.RAW.bind(this);
|
||||||
this._encHandlers[encodings.encodingCopyRect] = RFB.encodingHandlers.COPYRECT.bind(this);
|
this._encHandlers[encodings.encodingCopyRect] = RFB.encodingHandlers.COPYRECT.bind(this);
|
||||||
|
|
|
||||||
2
vnc.html
2
vnc.html
|
|
@ -331,7 +331,7 @@
|
||||||
autocorrect="off" autocomplete="off" spellcheck="false"
|
autocorrect="off" autocomplete="off" spellcheck="false"
|
||||||
mozactionhint="Enter" tabindex="-1"></textarea>
|
mozactionhint="Enter" tabindex="-1"></textarea>
|
||||||
|
|
||||||
<canvas id="noVNC_canvas" width="0" height="0" tabindex="-1">
|
<canvas id="noVNC_canvas" width="0" height="0">
|
||||||
Canvas not supported.
|
Canvas not supported.
|
||||||
</canvas>
|
</canvas>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue