| Index: ui/views/controls/textfield/textfield.cc
|
| diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
|
| index 8414521dd258ccc1ec46ef855a242c5fc03b3fa8..253068589a8ce04fc0aee2f4f6aad202a8f8fc8e 100644
|
| --- a/ui/views/controls/textfield/textfield.cc
|
| +++ b/ui/views/controls/textfield/textfield.cc
|
| @@ -771,8 +771,11 @@ void Textfield::OnGestureEvent(ui::GestureEvent* event) {
|
|
|
| // This function is called by BrowserView to execute clipboard commands.
|
| bool Textfield::AcceleratorPressed(const ui::Accelerator& accelerator) {
|
| - ui::KeyEvent event(accelerator.type(), accelerator.key_code(),
|
| - accelerator.modifiers());
|
| + ui::KeyEvent event(
|
| + accelerator.key_state() == ui::Accelerator::KeyState::PRESSED
|
| + ? ui::ET_KEY_PRESSED
|
| + : ui::ET_KEY_RELEASED,
|
| + accelerator.key_code(), accelerator.modifiers());
|
| ExecuteTextEditCommand(GetCommandForKeyEvent(event));
|
| return true;
|
| }
|
|
|