
I liked this plugin so much I just had to fix it and use it!
Brian’s Threaded Comments is such a powerful tool to be used on a bloggers site. It really encourages interaction between yourself and all of your Commentators as well. In fact, on Saman’s site I was able to get into a great Haiku/Zen fight with Natron that was easily readable thanks to this plugin. I have seen the successes of it many times over on many blogs including the great Saman Sadeghi and the great John Chow.
So what on earth is my problem with this plugin? Well its really very simple, I’m a “tabber”. When I fill out a web form, I use my tab button to tab from one field to the next. I fill out my name, press tab, fill out my email, press tab, etc…. Well the problem with Brian’s Threaded Comments is once you hit tab after the Comment box, you are sent to the top of the page rather than being sent to the Add Comment Button.
Example:

The Problem:
Is actually very simple. When putting the code and output together, Brian assigned a tabindex to the four text input fields, but not the button. So your browser being the good little trooper it is follows in the tab order given, then resets back to its default for the remaining items. Your page itself is typically the first tab, when you override that, it waits its turn and than takes the soonest opportunity. Thus, that is why right now when you tab from comments hoping to be sent to the button, you get sent to the top of the page.
The Solution:
Or should I call it “a solution”. There are many ways to fix this, but perhaps the easiest way is to just assign a tabindex to the button. What you want to do is find the following line in your custom comments.php code:
<input onclick="if(typeof(onAddComment) == 'function') { onAddComment(); } else { alert('ERROR:
It looks like the website administrator hasn\'t activated the Brians Threaded Comments plugin from the plugin page'); };" name="addcommentbutton" type="button" id="addcommentbutton" value="Add comment" tabindex="5" />
Due to limited space, the above wrapped, but this will be just one line in the code (unless your coded editor wraps text). The location of it will most likely be different for everyone as we have all added custom code for avatars and such, but for me, this was at line 203. So my guess is it is in that general neighborhood for you too. As you can see by the code example above, I just added tabindex="5" at the very end. That fixed the tab order issue and now all the “tabbers” like me will love posting on your site again!
*Update - Turns out I was not the only one who was annoyed by this error. Ryan J Parker had also written a post about it too, it can be found here: Fixing the Tab Index with Brian’s Threaded Comments
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!
Add This Site To Your Technorati Favorites!Let me know that you added me by posting a comment below and then I will add you as a favorite of mine as well!
Please Give Me Some Rice!Giving me "rice" on Nice4Rice.com also benefits you by giving you a free linkback on that site too.


ReformatThis is a Sole Proprietorship Company owned and operated by RJ Matthis. This website is the personal blog of RJ Matthis and will contain a wide range of rambling thoughts. Everything from technical php tips to posts full of RJ's creative nonsense.






Thanks a lot for the fix Bobs! This will definitely make life easier!!
Sorry to bother you, Saman, but I thought I’d reply to you, so the "threaded" construct would show right here. You look like a good fellow … you’ll forgive me, yes?
And *TaDa!* the tabbing worked perfectly.
cheers
[…] Saman, About 2 minutes ago Print This Post My good friend Bobs has written a fix for the Brian’s Threaded Comments plugin! As of now, when you’re entering a comment on a site running the plugin, you can tab from the […]
Thank you!!!
[…] problem until Reformat This told me about it (I don’t use the tab key). Luckily, there is a simple fix for this problem and I want to thank Reformat This for coming up with it. All you tabbers can now […]
^ Woo Hoo! The Evil One Himself!
Thank you for the quick fix!
good job
Hello,
I rolled this fix into the plugin. I was unaware of it until you posted in my forums (I can’t keep track of the ten billion comments added to the post about BTC on my blog - effectively highlighting another weakness of the plugin).
Thanks for bringing this to my attention.
If you would me to credit you in the plugin header, send me an email with the name and URL to use.
^ !!!MISSION ACCOMPLISHED!!!
I will send Brain an email and also ask him to credit Ryan J Parker as well since he also noticed this error in the plugin.
Nice tip, too bad I’m using Drupal. Perhaps I should look if there is a version of this module on Drupal, and if not, I could port it.
Thanks man… works great!
[…] PureBlogging.com came by my site thanks to the recent John Chow post after I informed John about a problem with Brian’s Threaded Comments. When David browsed my site, he noticed that I write site reviews and requested that I write one […]
Great post! Find a plugin, fix it, promote it - exactly what WP should be about. How long did the fix take?
great fix.
[…] solution is actually very simple. Bobs from Reformat This pointed me toward a post that he did a little while back. All you need to do to fix this “tab […]
Can somebody tell how to show the text, that your comment is in moderation with brian’s threaded comments plugin? it does not work currently.
hi
I have brian’s comment plugin, but I can’t enhance it like your comment section. may u send me your plugin for me to use it in my site?
[…] to RJ Matthis and Ryan for the […]
Предлагаю обсудить интересные и полезные блоги по различным тематикам.
Мне нравится блог о компьютерах - http://reviews.org.ru/asd/1.php