odyniec / imgareaselect

ImgAreaSelect is a jQuery plugin for selecting a rectangular area of an image. It allows web developers to easily implement image cropping functionality, as well as other user interface features, such as photo notes (like those on Flickr).
http://odyniec.net/projects/imgareaselect/
686 stars 197 forks source link

reset keypress handler problem #11

Closed cleeeem closed 11 years ago

cleeeem commented 13 years ago

Hi,

I suggest you to check if "$.imgAreaSelect.onKeyPress" exists before unbinding "keydown" event or it will also unbind all other handlers outside the plugin.

if ($.imgAreaSelect.keyPress != docKeyPress && typeof($.imgAreaSelect.onKeyPress) != 'undefined' ) $(document).unbind($.imgAreaSelect.keyPress, $.imgAreaSelect.onKeyPress);

odyniec commented 11 years ago

I haven't been able to produce such a scenario, I think it shouldn't happen. Feel free to reopen this issue if you can demonstrate otherwise.

virvum commented 7 years ago

I can reproduce the problem.