Question

Why does Jquery UI dialog called every time on escape key press? how to stop triggering open dialog on clicking escape?

$(document).keyup(function (e) {
    // esc
    if (e.keyCode == 27) {
          e.stopPropagation();
    }   
});
Was it helpful?

Solution

This might be what you're looking for. Pass this as an option when you make your dialog

'$("#blah").dialog({closeOnEscape: false});'

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top