Skip to content

Commit 2f3d6d8

Browse files
committed
Close ballot dialog if Escape is pressed
- Legacy-Id: 1912
1 parent 36631c6 commit 2f3d6d8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

static/js/base.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ function showBallot(draftName, trackerId) {
4949

5050
var buttons = [{text:"Close", handler:handleClose, isDefault:true}];
5151
buttons.unshift({text:"Edit Position", handler:handleEditPosition});
52+
var kl = [new YAHOO.util.KeyListener(document, {keys:27}, handleClose)]
5253
IETF.ballotDialog = new YAHOO.widget.Dialog("doc_ballot_dialog", {
5354
visible:false, draggable:false, close:true, modal:true,
5455
width:"850px", fixedcenter:true, constraintoviewport:true,
55-
buttons: buttons});
56+
buttons: buttons, keylisteners:kl});
5657
IETF.ballotDialog.render();
5758
}
5859
document.getElementById("doc_ballot_dialog_name").innerHTML = draftName;

0 commit comments

Comments
 (0)