If
0)use IE (this behaviour doesn't manifest on netscape)
1)you enable the html area module, and
2)you enable the "new comment form" checkbox on the comment module (so that an input field for putting in a new comment will appear at the bottom of your comment pages).
3)You have a story with enough comments to use more than one page
4)(don't know if it matters, but I view comments "Flat List-expanded" mode).

The following happens:
when you go from the first page of comments to the second (by clicking "next" or "2") you will go to the second page, but you will also be scrolled down to the bottom of the page. The cursor will be in the text area.

This is not the intended behaviour: the user clearly wants to read the comments on the second page, otherwise they wouldn't have clicked next.

This doesn't happen if you disable htmlarea (or use netscape).

Commenting out the following lines in htmlarea.js fixed the problem.

451 //editor.focusEditor();
459 //editor.focusEditor();
486 //this.focusEditor();

Regards,
-jimbo

Comments

gordon’s picture

Component: modules » User interface
Assigned: Unassigned » gordon

I have included the cvs version of htmlarea with htmlarea, can you please try this and tell me if this fixes this problem.

Anonymous’s picture

First: I've downloaded and are using the 4.3.0 archive.

Using the files from HTMLArea-CVS fixes seems to fix this problem (with Mozilla).
However it breaks IE. IE first returns the page with normal textboxes a reload (or the second time you visit a
page with textareas) you get a "Couldn't find server" error.
Turning off the htmlarea module is the only way to access the site with IE after this.

Anonymous’s picture

And yes another thing.
The problem (focus is set to the last textarea) occurs in mozilla/netscape aswell.
But mozilla doesnt "scroll" the page to the focus are so it's not that visible.
But if you load a page and start to write something you'll see that focus is in the last added textare component.

gordon’s picture

Once I get major bug out of the way I am going to make a change to htmlarea so that this is parameterise and send in a patch.

moshe weitzman’s picture

I confirm that this bug/issue still happens in CVS version.

Anonymous’s picture

I have fixed this problem in a parameterised method. the htmlarea.module will set this parameter to false, so that no auto focus will be done.

Anonymous’s picture