This morning I was working on an issue where clicking a tab link would cause Internet Explorer to jump to a scroll position lower on the page as if to a named anchor. The accessibility consultant I’m working with recommends that when a tab is activated, the focus should go to that tab’s content area. I thought maybe the tab switching code was just missing e.preventDefault() or return false on the click event but when I opened the file, the code to cancel the click was there. Eventually I deduced that the call to focus() was causing the jump but didn’t understand why exactly.
IE focus causes scroll
… and other assorted variations didn’t turn up many useful results in Google. I showed the issue to my coworker (and manager) and he immediately noticed that the browser was scrolling just far enough for the whole focused element to be within the viewport. After some experimentation, we discovered this odd feature: when focusing an element that has a defined height, Internet Explorer will scroll so that the entire element is in view. We tested in IE7 – IE9 and got the same result every time. In a way, it kind of makes sense that the browser would ensure the element is visible but unfortunately there’s no way to cancel it as far as I can tell. As a workaround, avoid defining a height for the element receiving focus.
There’s kind of a funny story to go along with this video, and one that I should tell before I forget all about it. On August 31st, the lady and myself were back in my hometown of Burk’s Falls, Ontario for an intimate Hawksley Workman show in the Towne Theatre, which seats about 150.
While we were waiting for the show to start, a very tall and distinctively dressed woman, with a particular, familiar hairstyle walked down the aisle past us, and set down a few rows ahead of us. I thought “that has to be Genesee!” (my friend and an ex-bassist of my ex-band). It wasn’t completely outside the realm of possibility that she would be back from Whitehorse visiting her family who live in the area. Since this would be the first time I had seen her in a few years , I was excited about this and tried to stage-whisper her name to try and get her attention. After a few unsuccessful attempts, I started to feel like I was making a scene and I would either have to try again later, or find her after the show.
The show, by the way, was excellent. It was my first time seeing Hawksley with a full band, and the set list was a great cross-section of his catalogue. I was especially happy that he played “Your Beauty Must Be Rubbing Off On Me,” but the video of that didn’t turn out (too much bouncing to good music). At around the halfway point, he announced that he would like to invite a special guest on stage to help out with a song. Surprisingly, the woman I thought was Genesee stood and took to the stage… It turns out that I was wrong, and as much as I thought they looked alike in a dark theatre, Imogen Heap is not Genesee Keevil.
Yesterday I was backing up my home directory to move everything over to a larger drive and a new install of Ubuntu, and for some reason I was curious which format my Tomboy notes were stored in. When I discovered that the ‘.note’ files in ~/.tomboy/ were XML files, I was excited about the idea of creating a web interface for Tomboy with PHP.
I searched the Tomboy mailing list and browsed around the wiki, and found that I wasn’t the first person to think of this (of course). I found a blog post about a mockup for Tomboy Online, but this was more of a hosted, social type of app and I was interested in making a standalone script. Also, it was only a concept, and no code exists for it. In the comments of this article there was a link to tomboy-web, but it was written in Java, so I couldn’t really play with it.
Unzip and upload to your web server BUT not before reading the security warning below.
Put your .note files in the ‘note-storage’ directory, either by manually uploading notes every once in a while or (way cooler) following the instructions in this blog post.
This is only a proof of concept, it’s a really bad idea to sync your confidential tomboy notes to your webserver. There are no security measures whatsoever. On the other hand, WordPress has an optional ‘blog by email’ feature which relies on the obscurity of a secret email address… if you are going to risk it, place the files in a very obscure directory (named as an md5 hash or similar).
One of my daily reads, Lifehacker, did a reader poll recently on the best text editors… I have to say I was pretty much incensed that jEdit wasn’t even in the running!
I’d been considering eventually writing a post to extol the many virtues of this free, open source, cross-platform and feature packed programmer’s text editor, but when I saw that it was snubbed in the LH poll, I was sort of inspired to post something in defense of it.