gwt /
gwt /
7041820d8789d3f5babbdc89df53e1d3ca51d121 PopupPanel.onEventPreview doesn't call the onKeyXXXPreview method unless the
key event originates from a Widget inside the PopupPanel. If the PopupPanel
does not contain a key event source (such as an input element), the key events
will be ignored entirely.
Change: I changed the logic to always fire the onKeyXXXPreview method, then
cancel the event based on the return value of the call, the event target, and
the modal setting.
boolean allow = onKeyXXXPreview((char) DOM.eventGetKeyCode(event),
KeyboardListenerCollection.getKeyboardModifiers(event)); return allow &&
(eventTargetsPopup || !modal);
There are 8 logical combinations to deal with when deciding whether or not to
cancel the event:
onKeyXXXPreview | target within PopupPanel | Modal = Do Not Cancel Event
true | true | true = true
true | true | false = true
true | false | true = false
true | false | false = true
false | true | true = false
false | true | false = false
false | false | true = false
false | false | false = false
Issue: 1316
Found by: danielm777
Fixed by: jlabanca
Review by: jgw
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1241 8db76d5a-ed1c-0410-87a9-c151d255dfc7
1 file changed