I hate when this happens: You are coding something that should work, but just doesn’t. Neither does it crash or hang, but just silently doesn’t do anything… And it is even worse when there are different interfaces for different platforms. But enough of whining, here comes my story:
Last week, a friend of mine asked whether I knew how to code in Javascript. Although I’m not very skilled in it, I have done some (advanced, as he said) stuff before (check this for an example) I decided to take the challenge… Some hours later, thanks to jQuery and its plugins I had already a working version with only one minor bug left… The bug in question seemed relatively simple: when appending text to input box, one had to put the caret to the end of the input box so when person continues typing new text gets appended to the end. It seemed to work very well, until the input box got filled with text when caret wasn’t visible anymore because no scrolling happened. After a lot of painful hours of console.debug() calls, I finally got to know that the same thing works on Internet Explorer.
So I decided to check Mozilla’s bugzilla. After typing some magic keywords to the searchbox I got a long list of bugs from where I found few reports describing the same issue. Fortunately one came with a patch which was posted almost 3,5 years ago!!! So I took the patch, adapted it to current XULRunner’s trunk (some paths and variables had changed over time), patched my local overlay and compiled it. It worked. :D:D:D
Bug report, my testcase and patch. Hopefully someone reviews it and commits it before new releases…