Closed
Bug 115997
Opened 23 years ago
Closed 13 years ago
alert()/confirm()/prompt() containing too much text is larger than the screen
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: atmjav, Unassigned)
References
(Depends on 1 open bug)
Details
Attachments
(6 files, 1 obsolete file)
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.6+) Gecko/20011218
BuildID: 2001121803
When an alert()/confirm()/prompt() window contains to much text it's larger than
the screen. I think it is good idea to add a vertical scrollbar that appear when
alert text is too large.
Reproducible: Always
Steps to Reproduce:
1. (for resolution 800x600) Execute this script:
alert("zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz zzzzz
zzzzz zzzzz zzzzz zzzzz");
Actual Results: Alert window with titlebar upper than top screen edge, without
OK button.
Expected Results: Alert window with OK button, not larger than (screen
width)-30 x (screen height)-80
Comment 1•23 years ago
|
||
XP apps. ccing ui people.
Assignee: rods → blakeross
Status: UNCONFIRMED → NEW
Component: HTML Form Controls → XP Apps: GUI Features
Ever confirmed: true
OS: Windows 98 → All
QA Contact: madhur → sairuh
Hardware: PC → All
Comment 2•23 years ago
|
||
could you pls attach a screenshot? thx!
Reporter | ||
Comment 3•23 years ago
|
||
Too large alert window appeared (image, prom the top of the screen to the
taskbar). (classic)
Reporter | ||
Comment 4•23 years ago
|
||
Too large alert window appeared (image, prom the top of the screen to the
taskbar). (modern)
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Updated•23 years ago
|
Depends on: 79623
Summary: When an alert()/confirm()/prompt() window contains to much text it's larger than the screen → alert()/confirm()/prompt() containing too much text is larger than the screen
Comment 6•20 years ago
|
||
See also bug 40508 (Message of the alert dialog truncated if no whitespace in a
long message) -- different issue bug similiar
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
Comment 7•20 years ago
|
||
*** Bug 254299 has been marked as a duplicate of this bug. ***
Comment 8•19 years ago
|
||
I was able to replicate this using:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060124 Firefox/1.5.0.1
Also, if you do the following: alert("1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111")
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111")
The box cuts off the text. See screenshot.
Comment 10•17 years ago
|
||
It's not just vertical overflow which is a problem...
Comment 11•17 years ago
|
||
sorry, posted wrong attachment
Attachment #279808 -
Attachment is obsolete: true
Comment 12•17 years ago
|
||
I have a solution for this bug, vetted over IRC by Enn. Patch coming.
Assignee: hewitt → guifeatures
Status: ASSIGNED → NEW
QA Contact: bugzilla
Comment 13•17 years ago
|
||
Attachment #279965 -
Flags: review?
Updated•17 years ago
|
Attachment #279965 -
Flags: review? → review?(enndeakin)
Comment 14•17 years ago
|
||
This patch adds scrollbars if the text is too big - and doesn't if the text isn't.
It may not be sufficient for accessibility purposes. I don't know of any way to scroll the main box via keystrokes. I'd take suggestions for that.
Assignee: guifeatures → ajvincent
QA Contact: guifeatures
Updated•17 years ago
|
Status: NEW → ASSIGNED
Component: XP Apps: GUI Features → XP Toolkit/Widgets: XUL
Product: Mozilla Application Suite → Core
Target Milestone: Future → mozilla1.9 M9
Comment 15•17 years ago
|
||
Requesting blocking1.9: this bug is for a usability issue with alerts, prompts & confirmation dialogs where the buttons simply aren't visible.
If the general approach is acceptable (I don't have any other ideas right now), then I can modify the patch as needed for 1.9.
I'm tempted to request approval-1.8.1 at the appropriate time, but it's probably a bit late...
Flags: blocking1.9?
Comment 16•17 years ago
|
||
Comment on attachment 279965 [details] [diff] [review]
patch, v1
> // display the main text
>- var messageParent = document.getElementById("info.box").getElementsByTagName('description')[0];
>+ var mainText = document.getElementById("info.box");
>+ var messageParent = mainText.getElementsByTagName('description')[0];
> // XXX the substr(0, 10000) part is a workaround for bug 317334
> messageParent.textContent = gCommonDialogParam.GetString(0).substr(0, 10000);
>
>+ var hboxTarget = dialog.getElementsByTagName("hbox")[0];
Is there a reason this code has been using getElementsByTagName to find elements rather than just using an id?
>+ var boxObject = document.getBoxObjectFor(mainText);
>+ if (boxObject.width > 640) {
>+ if (boxObject.height > 480) {
>+ hboxTarget.style.overflow = "scroll";
>+ hboxTarget.style.height = "480px";
>+ } else {
>+ hboxTarget.style.overflow = "-moz-scrollbars-horizontal";
>+ }
>+ hboxTarget.style.width = "640px";
>+ } else if (boxObject.height > 480) {
>+ hboxTarget.style.overflow = "-moz-scrollbars-vertical";
>+ hboxTarget.style.height = "480px";
>+ }
Looks OK. I guess just using a maxwidth/maxheight doesn't work well?
Comment 17•17 years ago
|
||
(In reply to comment #16)
> Is there a reason this code has been using getElementsByTagName to find
> elements rather than just using an id?
Not a good one, but I tend to favor minimalist patches that fix the reported problem over grand ones in the first review pass. I can expand the scope if you like.
> Looks OK. I guess just using a maxwidth/maxheight doesn't work well?
It might; I need to test that when I get home. It didn't work on Fx2.
Also, I'm not sure I picked the right hboxTarget. Look at all the elements inside the selected hbox...
Comment 18•17 years ago
|
||
Comment on attachment 279965 [details] [diff] [review]
patch, v1
Going to assume a new patch is coming.
Attachment #279965 -
Flags: review?(enndeakin) → review-
Flags: blocking1.9? → blocking1.9-
Whiteboard: [wanted-1.9]
Updated•17 years ago
|
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Comment 19•17 years ago
|
||
Alex: any plans to update this patch? I noticed this same problem again over in bug 244273
Comment 20•17 years ago
|
||
Not immediately, no. I'm still swamped at work.
Flags: wanted1.9-
Flags: wanted1.9+
Flags: wanted-next+
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: guifeatures → xptoolkit.widgets
Updated•16 years ago
|
Target Milestone: mozilla1.9beta1 → ---
Comment 22•16 years ago
|
||
The patch in bug 357725 might help here.
Also, see bug 481914, where it is made clear that the dialog is also used in mobile.
Comment 23•16 years ago
|
||
Updated•15 years ago
|
Assignee: ajvincent → nobody
Updated•15 years ago
|
Status: ASSIGNED → NEW
Comment 25•13 years ago
|
||
This has been fixed with the new alert() system in Firefox 4.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Comment 26•13 years ago
|
||
No way for the user to reach any buttons if the filename is longer than the screen here in
Mozilla/5.0 (X11; Linux i686; rv:12.0a2) Gecko/20120302 Firefox/12.0a2 Iceweasel/12.0a2
A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
Script: http://maps.gstatic.com/cat_js/intl/zh-TW_tw/mapfiles/399b/maps2/%7Bmain,mod_util,mod_act,mod_act_s,mod_actbr,mod_appiw,mod_hotel_price,mod_lyrs,mod_mssvt,mod_qop,mod_qopa,mod_rating_widget,mod_rst,mod_strr,mod_truffle%7D.js:903A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
You need to log in
before you can comment on or make changes to this bug.
Description
•