Return early in BrowserWindow::DispatchMessage(), if the message was already
handled. This would also fix return keys ending up in the URLTextView. git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@441 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
parent
ae82400bb4
commit
a150602b0f
@ -397,11 +397,13 @@ BrowserWindow::DispatchMessage(BMessage* message, BHandler* target)
|
||||
&& message->FindInt32("modifiers", (int32*)&modifiers) == B_OK) {
|
||||
|
||||
modifiers = modifiers & 0x000000ff;
|
||||
if (bytes[0] == B_LEFT_ARROW && modifiers == B_COMMAND_KEY)
|
||||
if (bytes[0] == B_LEFT_ARROW && modifiers == B_COMMAND_KEY) {
|
||||
PostMessage(GO_BACK);
|
||||
else if (bytes[0] == B_RIGHT_ARROW && modifiers == B_COMMAND_KEY)
|
||||
return;
|
||||
} else if (bytes[0] == B_RIGHT_ARROW && modifiers == B_COMMAND_KEY) {
|
||||
PostMessage(GO_FORWARD);
|
||||
else if (target == fURLInputGroup->TextView()) {
|
||||
return;
|
||||
} else if (target == fURLInputGroup->TextView()) {
|
||||
// Handle B_RETURN in the URL text control. This is the easiest
|
||||
// way to react *only* when the user presses the return key in the
|
||||
// address bar, as opposed to trying to load whatever is in there
|
||||
@ -413,6 +415,7 @@ BrowserWindow::DispatchMessage(BMessage* message, BHandler* target)
|
||||
fURLInputGroup->GoButton()->Invoke();
|
||||
snooze(1000);
|
||||
fURLInputGroup->GoButton()->SetValue(B_CONTROL_OFF);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user