title: Reveal modal popup foundation: Prevent close on popup
body: <p>I am using reveal-modal popup <a href="http://foundation.zurb.com/docs/components/reveal.html" rel="nofollow">http://foundation.zurb.com/docs/components/reveal.html</a>.</p>
  
  <p>Is there in in-built method to prevent closing of popup on esc key. Or how can i make it work?</p>
  
  <p>I tried the following,</p>
  
  <pre><code>    $(document).keyup(function(e) {
        if (e.keyCode === 27) {
          return e.preventDefault();
        }
      });
  </code></pre>
  
  <p>Link to open pop-up</p>
  
  <pre><code>    &lt;a class="action icon-primary" id="manageAccess" ng-click="Popup()"&gt;&lt;img src="images/Manage_Access_Icon.svg"/&gt;Access Pop up&lt;/a&gt;
  </code></pre>
  
  <p>pop-up</p>
  
  <pre><code>    &lt;div id="AccessContainer" class="reveal-modal large" data-reveal data-options="close_on_background_click:false;"&gt;
          //contents inside pop-up
          &lt;a class="close-reveal-modal"&gt;&amp;#215;&lt;/a&gt; // wil close pop-up
      &lt;/div&gt;
  
      $scope.Popup = function() {
        return $("#AccessContainer").foundation("reveal", "open");
      };
  </code></pre>
  
  <p>In foundation.reveal.js</p>
  
  <pre><code>settings : {
    animation: 'fadeAndPop',
    animation_speed: 250,
    close_on_background_click: true,
    close_on_esc: true, // how can i change this from my js
    dismiss_modal_class: 'close-reveal-modal',
    bg_class: 'reveal-modal-bg',
    open: function(){},
    opened: function(){},
    close: function(){},
    closed: function(){},
    bg : $('.reveal-modal-bg'),
    css : {
      open : {
        'opacity': 0,
        'visibility': 'visible',
        'display' : 'block'
      },
      close : {
        'opacity': 1,
        'visibility': 'hidden',
        'display': 'none'
      }
    }
  }
  </code></pre>
  
  <p>But still not working.</p>
  
  <p>Please help,
  Thanks.</p>