I can not clearly figure out why this sometimes happen and sometimes not, but, when then chatbox refreshes, the textbox where you input your text loses focus after refresh, which is annoying.

I'd say the default field to have focus after refresh is the textbox. Not true?

I have tested this on two computers with two different versions of Internet Explorer. Can someone else get the same problem?

To see this problem, go to http://www.netgold.co.za/ha

Regards,

Kobus

CommentFileSizeAuthor
#2 chatbox_focus.patch567 bytesjash4
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Component: Modules » User interface

This is a problem at least in some versions of IE.
The problem is that when the main content (frame) does a refresh, IE will give that frame focus.
I have a patch that returns focus to the input box, but I do not use it, as it leads to the chatbox always having focus, so you need to close the chatbox every time you want to surf on other pages (in other windows).

jash4’s picture

Version: » 4.6.x-1.x-dev
FileSize
567 bytes

Here's a fix to this problem. Whenever a post is submitted, the text frame is refreshed. That in turn refreshes the nicklist frame. To fix the problem I added the following js to the bottom of the nicklist frame:

parent.input.document.forms.chatform.words.focus();

which returns focus to the input frame's "words" field.

This patch works for me. I tested it in Konqueror 3.3.2, Firefox 1.0.3, and IE6 sp1.

TDobes’s picture

Fix committed to 4.5, 4.6, and CVS HEAD branches. Thanks.

Anonymous’s picture

ricmadeira’s picture

Version: 4.6.x-1.x-dev » 4.7.x-1.x-dev
Status: Closed (fixed) » Needs review

The solution implemented for this bug creates another problem, which is the chatbox window pops up over every other browser window on each refresh (at least with IE).

Maybe someone could try an alternate solution? Or at least work on the new issue this patch causes?

Darren Oh’s picture

Status: Needs review » Closed (fixed)

Since the patch has already been committed, it's too late to review it.