Created
April 10, 2012 16:37
-
-
Save danstuken/2352702 to your computer and use it in GitHub Desktop.
Trap Backspace to prevent dialog closing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function portfolioEditorDialogdialogRequestedHandler() { | |
$(document).bind('keydown', function (event) { | |
if (event.which == 8) { | |
var target = $(event.target); | |
if (!target.is('input')) | |
event.preventDefault(); | |
} | |
}); | |
} | |
function portfolioEditorDialogdialogUnrequestedHandler() { | |
$(document).unbind('keydown'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment