Version: (using KDE 4.1.2) OS: Linux Installed from: SuSE RPMs Konqueror 4.1.2 shows scrollbars for textarea elements whether they are required or not. No other major browser does this - neither Firefox nor Opera nor MS IE 7. So I consider this a bug. The display of scrollbars is especially disturbing for textarea elements with a small height values. The necessity to display scrollbars should be calculated from the "rows" attribute and from the style definitions for "font-size" or "line-height" and "height". Only if more lines are written than are displayable within the area of the element, scrollbars should appear automatically.
If it is agreed that this is a bug, the following patch seems to fix it: Index: khtml/rendering/render_form.cpp =================================================================== --- khtml/rendering/render_form.cpp (revision 876068) +++ khtml/rendering/render_form.cpp (working copy) @@ -1791,7 +1791,6 @@ if(wrap != DOM::HTMLTextAreaElementImpl::ta_NoWrap) { setLineWrapMode(QTextEdit::WidgetWidth); setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); - setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOn ); } else { setLineWrapMode(QTextEdit::NoWrap);
I just tried to find out since when a vertical scrollbar is shown by default. It seems that this was introduced in this commit: http://websvn.kde.org/?view=rev&revision=131655 Maybe this helps to decide whether this behaviour is intended or not. Considering the patch in comment 1, maybe it would be better to replace that line by setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded ); But that seems to be Qt's default anyway.
*** Bug 221830 has been marked as a duplicate of this bug. ***
SVN commit 1090000 by aiacovitti: Do not display scroll bars on textarea elements when not necessary. Match other browsers behaviour. Approved by Germain. BUG: 221830 CCBUG: 173585 M +7 -8 render_form.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1090000
SVN commit 1093037 by ggarand: automatically merged revision 1090000: Do not display scroll bars on textarea elements when not necessary. Match other browsers behaviour. Approved by Germain. BUG: 221830 CCBUG: 173585 M +7 -8 render_form.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1093037
This commit http://websvn.kde.org/?revision=1097847&view=revision clarifies what's the intendend behavior about the wish reported here. Therefore i think this bug can be closed as WONTFIX.
In my opinion the intention is quite clear: Textarea tags within form tags of any (X)HTML page should only show scrollbars when needed. I.e, when the actual text filled into the textarea field gets longer in vertical or horizontal direction than the area of the textarea-tag displayed in the browser. Konqueror displays vertical scrollbars all the time - independent of the row attribute and css height definitions. Just try with a textarea field defined as <textarea rows="2" cols="80" style="width:600px; height:500px;">some text</textarea> or even <textarea id="ka_utitel" name="ka_utitel" rows="2" cols="80" >some text</textarea> Vertical scrollbars will appear although they are completely unnecessary. None of the other browsers (firefox, opera, ms ie, safari, ....) does this.
Tested MSIE8/9 and both display vertical scrollbars by default. Changing severity to wishlist.
OK, I correct my statement from comment #7 as follows: None of the following browsers for Linux and Windows shows the vertical scrollbar when not needed : Firefox, Opera, Safari and Epiphany. Even Safari - which always was very close to Konqueror - does not. Therefore, the MS IEs are exceptions - but MS always does what it wants - whether it is reasonable, W3C compliant or not. What I find very interesting about "comment #8" and "http://websvn.kde.org/?revision=1097847&view=revision" is that the MS IE is used as a model browser regarding this bug .... Dear KDE developers, this is something I really do not understand ... Why should Konqueror behave as MS IE when all other major linux browsers do not ?????? Besides: the additional scrollbar reduces the space for the text below the width of the style directive. But do as you like - I seldom use Konqueror for web browsing nowadays ...