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

VERIFIED FIXED in Firefox 66

Status

()

defect
P1
normal
VERIFIED FIXED
4 months ago
4 months ago

People

(Reporter: v+mozbug, Assigned: Gijs)

Tracking

(Depends on 1 bug, {regression})

66 Branch
mozilla67
Desktop
All
Points:
---
Dependency tree / graph

Firefox Tracking Flags

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

Details

Attachments

(3 attachments)

Reporter

Description

4 months ago
Posted file test case

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.

Reporter

Comment 1

4 months ago

Comment 2

4 months ago

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
Assignee

Comment 4

4 months ago

(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)
Assignee

Comment 5

4 months ago

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

Updated

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

Comment 7

4 months ago

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.

Comment 8

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

Comment 9

4 months ago

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?

Updated

4 months ago
Flags: needinfo?(liviu.seplecan)

Comment 11

4 months ago
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/654017ec58a7
tabprompt dialog box size restrictions are completely broken, r=MattN
Assignee

Updated

4 months ago
Depends on: 1361115
Assignee

Updated

4 months ago
Flags: needinfo?(gijskruitbosch+bugs)

Comment 12

4 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Flags: qe-verify+

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+
You need to log in before you can comment on or make changes to this bug.