From 42f6dc686f313ba294e3cbcfb0ebde50678580fe Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Wed, 27 May 2015 02:48:15 +0200 Subject: Prioritize escape actions with a label hierarchy instead of an integer --- client/components/forms/inlinedform.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'client/components/forms') diff --git a/client/components/forms/inlinedform.js b/client/components/forms/inlinedform.js index 200a6f9d..b84952d2 100644 --- a/client/components/forms/inlinedform.js +++ b/client/components/forms/inlinedform.js @@ -17,8 +17,6 @@ // keyboard.js var currentlyOpenedForm = new ReactiveVar(null); -var inlinedFormEscapePriority = 30; - BlazeComponent.extendComponent({ template: function() { return 'inlinedForm'; @@ -37,7 +35,7 @@ BlazeComponent.extendComponent({ // if (currentlyOpenedForm.get() !== null) { // currentlyOpenedForm.get().close(); // } - EscapeActions.executeLowerThan(inlinedFormEscapePriority); + EscapeActions.executeLowerThan('inlinedForm'); this.isOpen.set(true); currentlyOpenedForm.set(this); }, @@ -97,7 +95,7 @@ BlazeComponent.extendComponent({ }).register('inlinedForm'); // Press escape to close the currently opened inlinedForm -EscapeActions.register(inlinedFormEscapePriority, +EscapeActions.register('inlinedForm', function() { return currentlyOpenedForm.get() !== null; }, function() { currentlyOpenedForm.get().close(); } ); -- cgit v1.2.3-1-g7c22