A Little Bug at WordPress

I’m developing a theme for wordpress now. The theme use the javascript color picker, like the WordPress default theme, Kubrick. There’s a button that will be the anchor for the Color Picker when it’s shown. I’m using DIV-type color picker, not the Window-type one, which means that the color picker is shown at a DIV element, not a new pop-up window. So much like Kubrick.

When I tried it up in Firefox, the color picker DIV is not shown up right under the button. The Error Console said that “error in parsing value top, bla bla bla”, means that the top property for the color picker DIV has a wrong value. FYI at Opera, that error doesn’t occur.

Wordpress Color Picker Bug

And then I try to take a look at the javascript file, colorpicker.js which is located inside wp-include/js directory. After some times, I found something missed at the function PopupWindow_showPopup that manages how will the DIV be shown.

At line 295, it said:

document.getElementById(this.divName).style.top = this.y;

See? The command to set the “top” property is incomplete. At Firefox, it needs a “px” if you want to change a size or dimension of an element. After I put the “px”, it works fine.

But of course, that’s not a suitable solution since I’ll release this theme, so the user of this theme (I hope there will be some users :D ) will have to change that file too. Fortunately, I can override that function. Owkey, but that makes my script seems so long. :(

Actually, I’d like to report this little bug to WordPress team, but I find that’s not easy, so much things to do, instead of just send email to Matt and say “Hi, Matt, I found a bug at WordPress here, maybe you can fix it.” So I changed my mind at write it out here. And hopefully they will read this. :P

Oh, yes… the post above is written in English. Bad grammar or tenses? ^:)^

Introducing WP Project

Ah, akhirnya saya bisa posting di sini.
Akhir-akhir ini nafsu posting saya benar-benar buntu, saya juga bener-bener bingung mau melakukan apa.. Akhirnya saya pun menyibukkan diri dengan sebuah “proyek” :D

Bukan proyek besar kok, cuma sepele.. Saya habis bikin satu blog lagi lho… Namanya WP Project. Blog itu saya pakai untuk mem-posting serta mempublikasikan WP stuff yang saya bikin macam theme dan plugin.

Tapi ya gitu, theme-nya sama sekali gak bagus, sementara plugin-nya sepele dan useless. Maklum, masih nyubi. :P

Silahkan dilihat-lihat dan didownload kalo tertarik :D Terima kasih ^:)^