Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Furnadjiev2016-09-02 12:06:19 +0000
committerIvan Furnadjiev2016-09-02 12:06:19 +0000
commit56d67fef5ecb588ba95d21fcb3398f6bf936daa8 (patch)
tree67384cd719a6702cf29ba81f883206b0d7168a19 /bundles
parent207a53c0dd9a06343285cc85398b7f867d0e7f75 (diff)
downloadorg.eclipse.rap-56d67fef5ecb588ba95d21fcb3398f6bf936daa8.tar.gz
org.eclipse.rap-56d67fef5ecb588ba95d21fcb3398f6bf936daa8.tar.xz
org.eclipse.rap-56d67fef5ecb588ba95d21fcb3398f6bf936daa8.zip
Fix active keys reset
When control active keys are reset to null, empty array is rendered in the protocol. Empty activeKeys object should not be treated as block all in KeyEventSupport#_shouldSendKeyDown, but allow all. Empty active/cancelKeys object should be considered as not set active/cancel keys. 499402: Key event listener and active keys: clear active keys doesn't work https://bugs.eclipse.org/bugs/show_bug.cgi?id=499402 Change-Id: I43644ecfbbdcdcab1c3075a4024631500d522f35
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.rap.rwt/js/rwt/remote/KeyEventSupport.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/remote/KeyEventSupport.js b/bundles/org.eclipse.rap.rwt/js/rwt/remote/KeyEventSupport.js
index d6d412ef0c..dedb4af5f2 100644
--- a/bundles/org.eclipse.rap.rwt/js/rwt/remote/KeyEventSupport.js
+++ b/bundles/org.eclipse.rap.rwt/js/rwt/remote/KeyEventSupport.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2014 EclipseSource and others.
+ * Copyright (c) 2009, 2016 EclipseSource and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -108,7 +108,7 @@ rwt.qx.Class.define( "rwt.remote.KeyEventSupport", {
var result = false;
if( this._hasKeyListener( control ) ) {
var activeKeys = control.getUserData( "activeKeys" );
- if( activeKeys ) {
+ if( activeKeys && !rwt.util.Objects.isEmpty( activeKeys ) ) {
result = this._isActive( activeKeys, domEvent, keyCode, charCode );
} else {
result = true;
@@ -205,7 +205,7 @@ rwt.qx.Class.define( "rwt.remote.KeyEventSupport", {
var result = this._isActive( this._cancelKeys, domEvent, keyCode, charCode );
if( !result ) {
var cancelKeys = control ? control.getUserData( "cancelKeys" ) : null;
- if( cancelKeys ) {
+ if( cancelKeys && !rwt.util.Objects.isEmpty( cancelKeys ) ) {
result = this._isActive( cancelKeys, domEvent, keyCode, charCode );
}
}

Back to the top