Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
always handle escape in the webview
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed Aug 24, 2016
1 parent 9659cbc commit 9e2c01c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions atom/browser/api/atom_api_web_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,12 @@ void WebContents::HandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) {
if (type_ == WEB_VIEW && embedder_) {
// Send the unhandled keyboard events back to the embedder.
embedder_->HandleKeyboardEvent(source, event);
if (event.windowsKeyCode == ui::VKEY_ESCAPE) {
CommonWebContentsDelegate::HandleKeyboardEvent(source, event);
} else {
// Send the unhandled keyboard events back to the embedder.
embedder_->HandleKeyboardEvent(source, event);
}
} else {
// Go to the default keyboard handling.
CommonWebContentsDelegate::HandleKeyboardEvent(source, event);
Expand Down

1 comment on commit 9e2c01c

@bbondy
Copy link
Member

@bbondy bbondy commented on 9e2c01c Aug 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

Please sign in to comment.