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
No related branches found
No related tags found
1 merge request!5Improve a11y search
......@@ -360,6 +360,14 @@
}
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.
Finish editing this message first!
Please register or to comment