mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 697773 - Cannot type in AwesomeBar URL bar with hard keyboard. r=blassey
This commit is contained in:
parent
53ca846a50
commit
f8dc58683d
@ -148,6 +148,25 @@ public class AwesomeBar extends Activity {
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
// This method is called only if the key event was not handled
|
||||
// by any of the views, which usually means the edit box lost focus
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK ||
|
||||
keyCode == KeyEvent.KEYCODE_DPAD_UP ||
|
||||
keyCode == KeyEvent.KEYCODE_DPAD_DOWN ||
|
||||
keyCode == KeyEvent.KEYCODE_DPAD_LEFT ||
|
||||
keyCode == KeyEvent.KEYCODE_DPAD_RIGHT ||
|
||||
keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
|
||||
return super.onKeyDown(keyCode, event);
|
||||
} else {
|
||||
// Return focus to the edit box, and dispatch the event to it
|
||||
mText.requestFocusFromTouch();
|
||||
mText.dispatchKeyEvent(event);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
Loading…
Reference in New Issue
Block a user