Someone posted this on the homepage for this great module a while back:

whenever you use any of the included markup buttons, the textarea focus returns to the top of the document. For editing anything longer than a paragraph or two, this is really hard for users, as they immediately loose their place in the document.

That was over a year ago and it doesnt seem to have been brought up here. I also find this annoying. Anyone have ideas for a fix?

CommentFileSizeAuthor
#4 quicktags.js_.textarea-focus.patch874 bytestcblack

Comments

tcblack’s picture

I cannot replicate this on my system using either firefox 2.0.0.9 or IE 7.x
since this has been open for so long with no other feedback, I vote to close this issue.

peterpoe’s picture

I had this issue in Firefox 3b2. I added two lines to the javascript and it's now gone.
At the beginning of edInsertTag function:
prevTop = myField.scrollTop;
at the end of the function:
myField.scrollTop = prevTop;

The same could be probably added to edInsertContent too.

tcblack’s picture

Status: Active » Postponed (maintainer needs more info)

Could you provide a patch for this?

tcblack’s picture

Version: 5.x-1.x-dev » master
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new874 bytes

I finally had a chance to add these lines to the JS at both edInsertTag and edInsertContent and create a patch (attached).
Let's get some testing and feedback on this.

Reassigning to HEAD since that's where modifications should go.

+1 on works for me.

Krummrey’s picture

I've applied the patch.

Works better in Firefox now. Doesn't jump back to the top of the text.

Jan

johnbeamer’s picture

Status: Needs review » Reviewed & tested by the community

I've tested this extensively at a couple of sites and it fixes the issue. It should definitely be part of the next release.

tcblack’s picture

Status: Reviewed & tested by the community » Fixed

Since this effectively repairs a bug I've committed it to CVS Head.
I'm hoping to get some of the more ready patches committed before branching off for Drupal 6.x (No I don't have a specific time for a branch).

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.