一次愉快的 bug 修复经历

2013-10-11

使用 jQuery 插件 Jcrop 裁剪图片时,发现一个问题,如图:

不知道这里的 radio 哪里来的,很郁闷,因为以前用过一次,没遇到这个问题。
到 stackoverflow 上查了也没有类似的问题。
没办法,只好上官网留言问作者。
英语不太好,只能勉强描述问题:

<input type="radio" class="jcrop-keymgr" style="position: fixed; left: -120px; width: 12px; display: inline-block;">

There is a strange radio input in my page, I don’t know where it comes from, I think you can help me.
If you can give me your email address, I will send the pictue to you.

几个小时候,收到了作者的回复:

Hi… I think the option to turn that off is keySupport: false…
I have a new version that is completely rewritten, and much better…
Check “WIP-2.x” branch on github.
Should allow keyboard support without the (supposed to be hidden) radio input…
Documentation in progress…but should be similar in most cases.

作者很热心,不仅提供了解决方案,还告诉我新版本完全重写,非常好~
我尝试了一下,在代码中加了 keySupport: false,OK,问题解决。
这个作者太厚道了,我对他的景仰如同滔滔黄河之水天上来。。。(后面省略1000字)
立马回复作者:

Hi ! Thank you for your reply.
With your help, I have successfully solved the problem.
With thanks again and best wishes to you !

最后不得不感叹一句,这个作者真棒!