6.0.0-alpha14
7/3/25

[#9297] Unnecessary scroll bar on some HTML messages
Summary Unnecessary scroll bar on some HTML messages
Queue IMP
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester rui.carneiro (at) portugalmail (dot) net
Created 10/07/2010 (5383 days ago)
Due
Updated 10/26/2010 (5364 days ago)
Assigned
Resolved 10/21/2010 (5369 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/26/2010 11:27:56 PM Git Commit Comment #8 Reply to this comment
10/22/2010 10:01:21 AM rui (dot) carneiro (at) portugalmail (dot) net Comment #7 Reply to this comment
As expected, your technique worked on your message but did not on 
several other test messages I have.  However, I found a brute force 
technique - to give 5 shots at expanding the IFRAME size by 
gradually increasing and looking for scrolling - works in most 
cases.  So I'm going ahead with that approach for now.
Great hack :)
10/21/2010 06:36:04 AM Michael Slusarz Comment #6
Assigned to Michael Slusarz
State ⇒ Resolved
Reply to this comment
As expected, your technique worked on your message but did not on 
several other test messages I have.  However, I found a brute force 
technique - to give 5 shots at expanding the IFRAME size by gradually 
increasing and looking for scrolling - works in most cases.  So I'm 
going ahead with that approach for now.
10/21/2010 06:34:02 AM Git Commit Comment #5 Reply to this comment
Changes have been made in Git for this ticket:

Bug #9297: More hacks to fix IFRAME height for troublesome HTML data

http://git.horde.org/diff.php/imp/js/imp.js?rt=horde-git&r1=b8fddd7910ba55bebea83680586e0e19785b6a8c&r2=59ee9d3f8fbb867c3f04e15b3657079e0b92e62b
10/08/2010 10:37:45 AM rui (dot) carneiro (at) portugalmail (dot) net Comment #4 Reply to this comment
As for the vertical scroll bar - this seems to be a limitation of 
IFRAME behavior.  I have seen many messages where you resize the 
outer IFRAME to the current internal height, and once that happens 
the internal height is increased again.  To prevent inifinte loops, 
after several tries we stop resizing.
Are you sure about this? The increased height (on my example) is not 
just the height from the horizontal scrollbar? I added ~20px to iframe 
height (here: 
http://github.com/horde/horde/blob/master/imp/js/imp.js#L94) to fix 
the extra height from scrollbar and is working now.

PS: If you want something more exact than adding ~20px you can always 
calculate the scroll width: 
http://jdsharp.us/jQuery/minute/calculate-scrollbar-width.php

10/07/2010 05:08:09 PM rui (dot) carneiro (at) portugalmail (dot) net Comment #3 Reply to this comment
This is expected behavior.  If the internal HTML doesn't wrap (i.e. 
long line), how else are you supposed to display the full width of 
the message without having the browser window wrap?
I forgot to mention that the problem was on vertical scroll bar :P
As for the vertical scroll bar - this seems to be a limitation of 
IFRAME behavior.  I have seen many messages where you resize the 
outer IFRAME to the current internal height, and once that happens 
the internal height is increased again.  To prevent inifinte loops, 
after several tries we stop resizing.

For either issue, if you can find a better solution let us know.
I will take a look on that.
10/07/2010 03:49:23 PM Michael Slusarz Comment #2
State ⇒ Not A Bug
Reply to this comment
This is expected behavior.  If the internal HTML doesn't wrap (i.e. 
long line), how else are you supposed to display the full width of the 
message without having the browser window wrap?

As for the vertical scroll bar - this seems to be a limitation of 
IFRAME behavior.  I have seen many messages where you resize the outer 
IFRAME to the current internal height, and once that happens the 
internal height is increased again.  To prevent inifinte loops, after 
several tries we stop resizing.

For either issue, if you can find a better solution let us know.
10/07/2010 02:45:10 PM rui (dot) carneiro (at) portugalmail (dot) net Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Unnecessary scroll bar on some HTML messages
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
New Attachment: message.mime Download
State ⇒ Unconfirmed
Reply to this comment
This bug occurs with multiple long strings (without spaces).

Screenshot: http://img840.imageshack.us/img840/2076/examplec.png

Saved Queries