Twitter Bootstrap 2.3: Crop Area Continues Moving After Selection
Споймал такой же баг https://github.com/tapmodo/Jcrop/issues/79 (описание на англ)
При выделении области для кропа, она бегает за указателем мыши. В консоли ошибка "Uncaught RangeError: Maximum call stack size exceeded" jcrop.
Оказывается лечится просто:
В Jcrop в функции https://github.com/tapmodo/Jcrop/blob/master/js/jquery.Jcrop.js#L1153
This file contains 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 toBack() //{{{ | |
{ | |
$trk.css({ | |
zIndex: 290 | |
}); | |
$(document).unbind('.jcrop'); | |
} |
строку: $(document).unbind('.jcrop');
заменим на
This file contains 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
$(document).unbind('touchmove.jcrop'); | |
$(document).unbind('touchend.jcrop'); | |
$(document).unbind('mousemove.jcrop'); | |
$(document).unbind('mouseup.jcrop'); |