Bug 140487 - javascript: alert does not check current screen size
Summary: javascript: alert does not check current screen size
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-23 10:50 UTC by Maciej Pilichowski
Modified: 2008-06-01 22:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase (435 bytes, text/html)
2008-06-01 22:16 UTC, FiNeX
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Pilichowski 2007-01-23 10:50:12 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    SuSE RPMs

Consider:
javascript:alert("here is veeeeeeeeeeeeeeeeeeeeeeeery long line")

Konqueror does not check the screen size and the effect could be this that the message would be clipped.

a) One solution would be to provide scrollbars if the message is too long to display it
b) or (much better imho) to format the text to fit the screen

ad.b) it is much more flexible -- note, that I can prepare a page which works fine on my 1400x1050 screen, but if somebody try to use it on 800x600 it is disaster. Konqueror should help a bit here. Firefox works here really great -- from what I spotted it has smart reformat feature -- tries to "break" lines at dot characters.

This report is somehow related to old one: https://bugs.kde.org/show_bug.cgi?id=18875 but this was about displaying alert from variables and as I understand showing too long dialog windows -- this is no longer the case, the dialog has correct size, however the text inside is too long.
Comment 1 Bram Schoenmakers 2007-01-23 11:05:23 UTC
And did you read what Harri Porter said?

"Other browser don't do that either. If we would break the lines a web  developer working on konq would produce non-portable HTML. "

I'd rather go for closing this bug report.
Comment 2 Maciej Pilichowski 2007-01-23 14:28:37 UTC
Bram, did you read my report? I said "Firefox _DOES_ that". 

The other report is about dialog width, the other report is SIX years old. A lot of things have changed.
Comment 3 Maciej Pilichowski 2007-01-23 14:33:56 UTC
PS1. Mozilla/Netscape works fine too, and Opera also. So I guess only Konqueror does not do the right job (I cannot check MSIE).

PS2. I am a bit surprised that it is even a concern if the report is valid. Browser should allow the user to see the contents, whole contents -- if you open html page with table 100000000000 pixels wide, Konqueror will show scrollbars so you can see the _whole_ content. The same applies to _everything_ displayed. JS alert too -- people can use really various font sizes/screen res.
Comment 4 FiNeX 2008-06-01 22:15:53 UTC
Bug solved in KDE 4 (tested in current trunk, 4.1 beta).

The bug is still present in 3.5.9 but it won't be fixed.
Comment 5 FiNeX 2008-06-01 22:16:24 UTC
Created attachment 25052 [details]
testcase