Closed Bug 1007065 Opened 7 years ago Closed 7 years ago
cursor (caret) not visible in empty text input with text-align:right and overflow:hidden
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release) Build ID: 20140421221237 Steps to reproduce: "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0" Use following code: <HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY> <input type="text" name="test" style="text-align:right; overflow: hidden;"/> </BODY> </HTML> Actual results: In the input field with type text the cursor is not visible till at least one character is entered. Expected results: The cursor should be visible from the beginning, also at position zero and not only after entering some, at least one character.
Severity: normal → major
Component: Untriaged → General
See Also: → 200253
Reporter, did this break when you updated to Firefox 29? or earlier?
Severity: major → normal
Component: General → Layout
Product: Firefox → Core
It was broken after updating to Firefox 29!
Last good revision: 2d5d5fd03050 (2014-02-23) First bad revision: 31113754db3b (2014-02-24) Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2d5d5fd03050&tochange=31113754db3b
Status: UNCONFIRMED → NEW
Ever confirmed: true
It's a regression from bug 966992. If I enable layout.css.overflow-clip-box.enabled in about:config and then add the style 'overflow-clip-box:padding-box' in Inspector the text caret is displayed. I'll take a look...
(In reply to Mats Palmgren (:mats) from comment #5) > It's a regression from bug 966992. If I enable > layout.css.overflow-clip-box.enabled in > about:config and then add the style 'overflow-clip-box:padding-box' in > Inspector the > text caret is displayed. I'll take a look... Could this also be related to bug 997921 ? There's a different regression window there, but they seem far too suspiciously the same...
Regression window(m-i) Good: https://hg.mozilla.org/integration/mozilla-inbound/rev/924690f9d81b Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 ID:20140221162350 Bad: https://hg.mozilla.org/integration/mozilla-inbound/rev/ba884d47b839 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 ID:20140221171850 Pushlog: http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=924690f9d81b&tochange=ba884d47b839 In local build: Last Good: 0fbda9035da4 First Bad: 66c3d7b1701b Regressed by: 66c3d7b1701b Mats Palmgren — Bug 965237 - Make overflow-clip-box:content-box be the default for <input type=text/password/number> and <textarea>. r=roc
The bug only occurs if you explicitly specify overflow:hidden, so the easiest workaround is to not do that, or specify any other value. If that's not an option, another workaround is to specify padding-right:0.
Severity: normal → minor
Here's more context on the changed method: http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsFrame.h?rev=b7ed86c35097#562 Try runs: https://tbpl.mozilla.org/?tree=Try&rev=29b87ec21ec9 https://tbpl.mozilla.org/?tree=Try&rev=c80c2162cc5d
Attachment #8419058 - Flags: review?(roc)
Summary: For style="TEXT-ALIGN:Right; OVERFLOW:hidden;" in textField Cursor not visible till atleast one character is entered. → cursor (caret) not visible in empty text input with text-align:right and overflow:hidden
Attachment #8419058 - Flags: review?(roc) → review+
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Verified fixed 32.0a1 (2014-05-13), Win 7 x64
Mats, could you fill an uplift request for aurora and beta?
Comment on attachment 8419058 [details] [diff] [review] fix+test This doesn't seem like Aurora/Beta material to me, but here you go: [Approval Request Comment] Bug caused by (feature/regressing bug #): 965237 User impact if declined: The input caret is not displayed in its right-most position for text input elements that are styled with "text-align:right; overflow: hidden;" (which I'm guessing is very rare). Easy to workaround though, with no loss of function/appearance, see comment 8. Testing completed (on m-c, etc.): on m-c since 2014-05-12 Risk to taking this patch (and alternatives if risky): low String or IDL/UUID changes made by this patch: none
Comment on attachment 8419058 [details] [diff] [review] fix+test Approving for uplift since it's a low risk fix for a recent regression. We don't know how many sites this affects but having the fix out sooner than 3 versions later is likely a good thing.
Reproduced with 29 beta 9 (Build ID: 20140417185217) - the caret is not visible. Verified as fixed on Firefox 30 beta 7 (Build ID: 20140522105902) on Win 7 64bit, Ubuntu 14.04 32bit and Mac OS X 10.9.2: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 Mozilla/5.0 (X11; Linux i686; rv:30.0) Gecko/20100101 Firefox/30.0 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:30.0) Gecko/20100101 Firefox/30.0
Verified as fixed with latest Aurora 31.0a2 (Build ID: 20140609004001) on Windows 7 x64, Ubuntu 14.04 x32 and Mac OS X 10.9.2: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0 Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Firefox/31.0
You need to log in before you can comment on or make changes to this bug.