Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#2 | chatbox_focus.patch | 567 bytes | jash4 |
Comments
Comment #1
(not verified) CreditAttribution: commentedThis 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).
Comment #2
jash4 CreditAttribution: jash4 commentedHere'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.
Comment #3
TDobes CreditAttribution: TDobes commentedFix committed to 4.5, 4.6, and CVS HEAD branches. Thanks.
Comment #4
(not verified) CreditAttribution: commentedComment #5
ricmadeira CreditAttribution: ricmadeira commentedThe 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?
Comment #6
Darren OhSince the patch has already been committed, it's too late to review it.