textarea focua (push quicktag button = cursor jumps to top)
rkn - February 28, 2007 - 14:32
| Project: | quicktags |
| Version: | HEAD |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
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?

#1
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.
#2
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.
#3
Could you provide a patch for this?
#4
I finally had a chance to add these lines to the JS at both
edInsertTagandedInsertContentand 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.
#5
I've applied the patch.
Works better in Firefox now. Doesn't jump back to the top of the text.
Jan
#6
I've tested this extensively at a couple of sites and it fixes the issue. It should definitely be part of the next release.
#7
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).
#8
Automatically closed -- issue fixed for two weeks with no activity.