Comment #8 on issue 4203 by m0.interactive: When omnibox has focus and no
drop down, ESC should select the whole line
http://code.google.com/p/chromium/issues/detail?id=4203
Therefore, not all cases of RevertAll, we should call SelectAll,
The only thing I could think of doing is on the method that is
being worked on now.
bool AutocompleteEditModel::OnEscapeKeyPressed() {
// Only do something when there is input in progress -- otherwise, if
focus
// happens to be in the location bar, users can't still hit <esc> to stop
a
// load.
if (!user_input_in_progress_) {
view_->SelectAll(true);
return false;
}
if (!has_temporary_text_ ||
(popup_->URLsForCurrentSelection(NULL, NULL, NULL) == original_url_))
{
// The popup isn't open or the selection in it is still the default
// selection, so revert the box all the way back to its unedited state.
view_->RevertAll();
view_->SelectAll(true);
return true;
}
// The user typed something, then selected a different item. Restore the
// text they typed and change back to the default item.
// NOTE: This purposefully does not reset paste_state_.
just_deleted_text_ = false;
has_temporary_text_ = false;
keyword_ui_state_ = original_keyword_ui_state_;
popup_->ResetToDefaultMatch();
view_->OnRevertTemporaryText();
return true;
}
I believe that is sufficient to, if we place SelectAll after every
RevertAll,
the input for omnibox will always be selected which is not needed.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Chromium-bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/chromium-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---