Closed Bug 1530557 Opened 6 years ago Closed 6 years ago

alert() box text doesn't wrap, causing buttons to appear off-screen

Categories

(Toolkit Graveyard :: Notifications and Alerts, defect, P1)

66 Branch
Desktop
All
defect

Tracking

(firefox-esr60 unaffected, firefox65 unaffected, firefox66+ verified, firefox67 verified)

VERIFIED FIXED
mozilla67
Tracking Status
firefox-esr60 --- unaffected
firefox65 --- unaffected
firefox66 + verified
firefox67 --- verified

People

(Reporter: v+mozbug, Assigned: Gijs)

References

Details

(Keywords: regression)

Attachments

(3 files)

Attached file test case (deleted) —

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0

Steps to reproduce:

Debugging a web page, I tossed up an alert box and discovered it was far wider than my 4K monitor!

Actual results:

I'll attach a screen shot. The long, long text in the alert box all got stuck on one line, happily, the alert box was right-aligned with the browser window, so I could click OK!

Expected results:

Line wrapping, so the whole message can be seen. That's what happens in the 65 branch.

At first I wondered if somehow the alert box was borrowing white-space: pre; from somewhere in my page (I do have it in various places), but the test case below reproduced the problem with very little code, showing my attempt to make it use white-space: pre; but the 65 branch still wrapped the alert box text, and the 66 branch did not.

Attached image Shows the wide alert box (deleted) —

Hi @Glenn Linderman, I've tested this issue and this is my results:
[Platform tested]: Windows 10, Ubuntu 16.04, Mac OS X
[Firefox affected versions]: latest nightly 67.0a1, beta 66.0b12
[Firefox unaffected version]: release 65.0.2

Thanks for your contribution.

Blocks: 1512048
Status: UNCONFIRMED → NEW
Component: Untriaged → Notifications and Alerts
Ever confirmed: true
Keywords: regression
OS: Unspecified → All
Product: Firefox → Toolkit
Hardware: Unspecified → Desktop

[Tracking Requested - why for this release]: Regression that can cause usability issues since the user may not be able to dismiss the prompt if the buttons are off-screen.

Priority: -- → P1
Summary: alert box with white-space: pre ? Or that effect! → alert() box text doesn't wrap, causing buttons to appear off-screen

(In reply to Liviu Seplecan from comment #2)

Hi @Glenn Linderman, I've tested this issue and this is my results:
[Platform tested]: Windows 10, Ubuntu 16.04, Mac OS X
[Firefox affected versions]: latest nightly 67.0a1, beta 66.0b12
[Firefox unaffected version]: release 65.0.2

Thanks for your contribution.

Can you find a regression window?

Flags: needinfo?(liviu.seplecan)

Oh, the regression window is supposed to be bug 1512048? That wasn't clear... (leaving ni to confirm)

Ni me to clean this up, I guess.

Flags: needinfo?(gijskruitbosch+bugs)
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Flags: needinfo?(gijskruitbosch+bugs)

The issue is that the patch in bug 1512048 replaced some code where this was always both the element and the binding with code where this was now only ever the binding / JS class, and missed adding the .element getter to make fetching DOM props off the element work.

Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/34d5cbb640e3 tabprompt dialog box size restrictions are completely broken, r=MattN

Comment on attachment 9048329 [details]
Bug 1530557 - tabprompt dialog box size restrictions are completely broken, r?MattN

Beta/Release Uplift Approval Request

  • Feature/Bug causing the regression: Bug 1512048
  • User impact if declined: DoS vector / usability issue with prompt contents being way too big
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See comment #0 / attached testcase
  • List of other uplifts needed: n/a
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple 2-line patch to fix a mistake when moving code around in the regressing bug. Easy to verify things work now. Yes, I know it's late in beta, but this fix is trivial enough that I think we should take it - we can't really make the status quo here worse.
  • String changes made/needed: nope
Attachment #9048329 - Flags: approval-mozilla-beta?
Flags: needinfo?(liviu.seplecan)
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/654017ec58a7 tabprompt dialog box size restrictions are completely broken, r=MattN
Depends on: 1361115
Flags: needinfo?(gijskruitbosch+bugs)
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67

I successfully reproduced the issue on Firefox Nightly 67.0a1 (2019-02-25) under Windows 10 (x64) using the STR from Comment 0.

The issue is fixed on latest Nightly 67.0a1 (2019-03-05). Tests were performed under Windows 10 (x64), Ubuntu 18.04 (x64) and macOS 10.12.

I will verify the fix on beta too as soon as it will be pushed.

Status: RESOLVED → VERIFIED

Comment on attachment 9048329 [details]
Bug 1530557 - tabprompt dialog box size restrictions are completely broken, r?MattN

Fix for regression in 66, verified in nightly, has test coverage.
OK for uplift for beta 14.

Attachment #9048329 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

The issue is fixed on Firefox Beta 66.0b14 (20190307002254), build taken from treeherder. Tests were performed under Windows 10 (x64), Ubuntu 18.04 (x64) and macOS 10.12.

Flags: qe-verify+
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: