| Index: ui/views/window/dialog_client_view.cc
|
| diff --git a/ui/views/window/dialog_client_view.cc b/ui/views/window/dialog_client_view.cc
|
| index c5c50cd9621d3f2dbac5bd021ebffedc1673868b..0db7188cc9c5a102a1a26a919a26cefc5fe3e3f2 100644
|
| --- a/ui/views/window/dialog_client_view.cc
|
| +++ b/ui/views/window/dialog_client_view.cc
|
| @@ -131,8 +131,11 @@ void DialogClientView::ShowDialogButtons() {
|
| ok_button_->SetGroup(kButtonGroup);
|
| if (is_default_button)
|
| default_button_ = ok_button_;
|
| - if (!(buttons & ui::DIALOG_BUTTON_CANCEL))
|
| - ok_button_->AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_NONE));
|
| + if (!(buttons & ui::DIALOG_BUTTON_CANCEL)) {
|
| + ok_button_->AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE,
|
| + ui::EF_NONE,
|
| + ui::ET_KEY_PRESSED));
|
| + }
|
| AddChildView(ok_button_);
|
| }
|
| if (buttons & ui::DIALOG_BUTTON_CANCEL && !cancel_button_) {
|
| @@ -155,7 +158,8 @@ void DialogClientView::ShowDialogButtons() {
|
| is_default_button);
|
| cancel_button_->SetGroup(kButtonGroup);
|
| cancel_button_->AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE,
|
| - ui::EF_NONE));
|
| + ui::EF_NONE,
|
| + ui::ET_KEY_PRESSED));
|
| if (is_default_button)
|
| default_button_ = ok_button_;
|
| AddChildView(cancel_button_);
|
| @@ -163,7 +167,9 @@ void DialogClientView::ShowDialogButtons() {
|
| if (!buttons) {
|
| // Register the escape key as an accelerator which will close the window
|
| // if there are no dialog buttons.
|
| - AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_NONE));
|
| + AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE,
|
| + ui::EF_NONE,
|
| + ui::ET_KEY_PRESSED));
|
| }
|
| }
|
|
|
|
|