1. Home
  2. Knowledge Base
  3. Codex
  4. JS API
  5. JS Filters
  6. applyFilters( “ignore_esc_key” )

applyFilters( “ignore_esc_key” )

applyFilters( "ignore_esc_key", ignore );

Allow manually ignoring the ESC keypress before an Area is hidden: Return true to ignore the keypress.

Params

ignore bool, required
Whether to ignore the keypress and do nothing.

Returns

The filtered “ignore” flag. Return true to keep the current Popup visible.

Examples

// Ignore all ESC keypresses.
DiviArea.addFilter( 'ignore_esc_key', function( ignore ) {
    return true;
});

Notes

This filter is only called, when an Area is visible that will be closed. When no Popup or other Area is visible, this filter is not fired.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Get in touch with us