@novnc/novnc 1.5.0-beta → 1.5.0-g06f14a5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -203,7 +203,7 @@ var Keyboard = exports["default"] = /*#__PURE__*/function () {
203
203
  // Possible start of AltGr sequence? (see above)
204
204
  if (code === "ControlLeft" && browser.isWindows() && !("ControlLeft" in this._keyDownList)) {
205
205
  this._altGrArmed = true;
206
- this._altGrTimeout = setTimeout(this._handleAltGrTimeout.bind(this), 100);
206
+ this._altGrTimeout = setTimeout(this._interruptAltGrSequence.bind(this), 100);
207
207
  this._altGrCtrlTime = e.timeStamp;
208
208
  return;
209
209
  }
@@ -217,11 +217,7 @@ var Keyboard = exports["default"] = /*#__PURE__*/function () {
217
217
 
218
218
  // We can't get a release in the middle of an AltGr sequence, so
219
219
  // abort that detection
220
- if (this._altGrArmed) {
221
- this._altGrArmed = false;
222
- clearTimeout(this._altGrTimeout);
223
- this._sendKeyEvent(_keysym["default"].XK_Control_L, "ControlLeft", true);
224
- }
220
+ this._interruptAltGrSequence();
225
221
 
226
222
  // See comment in _handleKeyDown()
227
223
  if ((browser.isMac() || browser.isIOS()) && code === 'CapsLock') {
@@ -244,16 +240,21 @@ var Keyboard = exports["default"] = /*#__PURE__*/function () {
244
240
  }
245
241
  }
246
242
  }, {
247
- key: "_handleAltGrTimeout",
248
- value: function _handleAltGrTimeout() {
249
- this._altGrArmed = false;
250
- clearTimeout(this._altGrTimeout);
251
- this._sendKeyEvent(_keysym["default"].XK_Control_L, "ControlLeft", true);
243
+ key: "_interruptAltGrSequence",
244
+ value: function _interruptAltGrSequence() {
245
+ if (this._altGrArmed) {
246
+ this._altGrArmed = false;
247
+ clearTimeout(this._altGrTimeout);
248
+ this._sendKeyEvent(_keysym["default"].XK_Control_L, "ControlLeft", true);
249
+ }
252
250
  }
253
251
  }, {
254
252
  key: "_allKeysUp",
255
253
  value: function _allKeysUp() {
256
254
  Log.Debug(">> Keyboard.allKeysUp");
255
+
256
+ // Prevent control key being processed after losing focus.
257
+ this._interruptAltGrSequence();
257
258
  for (var code in this._keyDownList) {
258
259
  this._sendKeyEvent(this._keyDownList[code], code, false);
259
260
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novnc/novnc",
3
- "version": "1.5.0-beta",
3
+ "version": "1.5.0-g06f14a5",
4
4
  "description": "An HTML5 VNC client",
5
5
  "browser": "lib/rfb",
6
6
  "directories": {
@@ -55,7 +55,6 @@
55
55
  "karma-mocha-reporter": "latest",
56
56
  "karma-safari-launcher": "latest",
57
57
  "karma-script-launcher": "latest",
58
- "karma-sinon-chai": "latest",
59
58
  "mocha": "latest",
60
59
  "node-getopt": "latest",
61
60
  "po2json": "latest",