Skip to content
Snippets Groups Projects
Commit 2fd99855 authored by Michael Fairchild's avatar Michael Fairchild
Browse files

Tell the parent window to close the results pane on escape key press

parent 1601e082
Branches
No related tags found
No related merge requests found
...@@ -360,6 +360,14 @@ ...@@ -360,6 +360,14 @@
} }
passiveQuery(q, false); passiveQuery(q, false);
}); });
if (window.parent != undefined) {
$(document).on('keydown', function(e) {
if (!e.keyCode || e.keyCode === 27) {
window.parent.postMessage('wdn.search.close', "*");
}
});
}
}); });
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment