Remove FIND_NEXT message for find text control

BTextControl calls Invoke() when it loses the focus and the text has
changed. We don't want this to trigger a search, and instead rely on the
user pressing enter to run the search.

Fixes the search happening again when closing the search bar (escape key
or otherwise), or clicking on the page after searching. Fixes #10168.
This commit is contained in:
Adrien Destugues
2014-01-17 15:42:53 +01:00
parent ab390d3af3
commit a61211c698
+1 -2
View File
@@ -508,8 +508,7 @@ BrowserWindow::BrowserWindow(BRect frame, SettingsMessage* appSettings,
// Find group
fFindCloseButton = new CloseButton(new BMessage(EDIT_HIDE_FIND_GROUP));
fFindTextControl = new BTextControl("find", B_TRANSLATE("Find:"), "",
new BMessage(EDIT_FIND_NEXT));
fFindTextControl = new BTextControl("find", B_TRANSLATE("Find:"), "", NULL);
fFindTextControl->SetModificationMessage(new BMessage(FIND_TEXT_CHANGED));
fFindPreviousButton = new BButton(B_TRANSLATE("Previous"),
new BMessage(EDIT_FIND_PREVIOUS));