Version: 3.3.1 (using KDE 3.3.1, compiled sources) Compiler: gcc version 2.95.4 20020320 [FreeBSD] OS: FreeBSD (i386) release 4.10-STABLE In a textarea with a scrollbar, scroll down without first clicking in the textarea. Next click in to the text at a particular point. The textarea jumps up towards the top of the text before the cursor is activated.
please attach a test case.
Created an attachment (id=8315) [details] Simply "testcase" for annoying bug
Same here. Most annoying is, if you tried to edit some larger text (like in a Wiki), by pasting a complete paragraph and that ends up at the wrong place because of the "jump back to top" effect.
CVS commit by coolo: restore scrolling position in case of a change in textareas and do not trigger the update code more often than necessary BUG: 93193 M +5 -0 ChangeLog 1.335 M +4 -1 rendering/render_form.cpp 1.282 --- kdelibs/khtml/ChangeLog #1.334:1.335 @@ -1,2 +1,7 @@ +2004-11-19 Stephan Kulow <coolo@kde.org> + + * rendering/render_form.cpp (updateFromElement): restore scrolling position in case of a change + in text and do not trigger the update code more often than necessary + 2004-11-17 Allan Sandfeld Jensen <kde@carewolf.com> --- kdelibs/khtml/rendering/render_form.cpp #1.281:1.282 @@ -1631,11 +1631,14 @@ void RenderTextArea::updateFromElement() w->setReadOnly(element()->readOnly()); QString elementText = element()->value().string(); - if ( elementText != text() ) + if ( elementText != w->text() ) { w->blockSignals(true); int line, col; w->getCursorPosition( &line, &col ); + int cx = w->contentsX(); + int cy = w->contentsY(); w->setText( elementText ); w->setCursorPosition( line, col ); + w->scrollBy( cx, cy ); w->blockSignals(false); }
You need to log in before you can comment on or make changes to this bug.