Thank you for reporting this bug. We will make it our priority to review this report.
-
Sencha Premium Member
GXT 3.0 Beta 4, ValueBaseField not capturing KeyUp or KeyPress events for Enter Key
This worked in 3.0 Beta 3. Try the code:
Code:
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;
import com.sencha.gxt.widget.core.client.form.TextField;
public class TestEnterKey implements EntryPoint {
public void onModuleLoad() {
TextField textField = new TextField();
textField.addKeyUpHandler(new KeyUpHandler() {
public void onKeyUp(KeyUpEvent event) {
if(event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
Window.alert("Enter key pressed");
}
}
});
RootPanel.get().add(textField);
}
}
-
Sencha User
Related: KeyPressEvent UiHandler no longer works in Beta4
KeyUp wasn't working for me in Beta 3...
-
Sencha Premium Member
Ahh thanks for the post. I believe it was working for me in Beta 3, I'll check for clarification. Debugging it a bit, doesn't seem like this event is fired at a lower level of ValueBasedField, (Field<T>). Possible focus wonkiness here?
-
Sencha Premium Member
Well it does work in Beta 3, but there is an issue with focus and Enter. You can type whatever into the field and the event works fine, yet Enter is not captured, unless you mouse click the text field again (refocus).
Beta 4 doesn't capture Enter at all. Will try with Trunk SVN.
-
Sencha Premium Member
Boo. Premium memberships don't permit SVN read-only access for 3.0+, atleast I couldn't find the repository.
-