Closed Bug 368893 Opened 16 years ago Closed 16 years ago

Caret right-aligned in initially focused textboxes

Categories

(Core :: Layout: Form Controls, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: stevee, Assigned: uriber)

References

Details

(Keywords: regression, Whiteboard: [blocking1.9a2+])

Attachments

(1 file)

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a2pre) Gecko/20070131 Minefield/3.0a2pre ID:2007013108 [cairo]

Reported by Littlemutt at the mz forums; http://forums.mozillazine.org/viewtopic.php?p=2725745#2725745

1. New profile
2. about:config
3. Examine the 'Filter' textarea. The cursor starts off on the right hand side of this element. When you give it focus, it appears over at the left hand side as expected.
Keywords: regression
I see this after upgrading from 2007013004 to 2007013104 in the same profile.
Component: General → Layout: Form Controls
Product: Firefox → Core
QA Contact: general → layout.form-controls
This is visible on Mactel

Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a2pre) Gecko/20070131 Minefield/3.0a2pre ID:2007013104 [cairo]
OS: Windows 2000 → All
Left aligned (expected)
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a2pre) Gecko/2007013011 Minefield/3.0a2pre

Right aligned (not expected)
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a2pre) Gecko/2007013013 Minefield/3.0a2pre

Range
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=PhoenixTinderbox&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-01-30+10&maxdate=2007-01-30+14&cvsroot=%2Fcvsroot

Bug 363198?
i can still see the bug when backout 363198 in my local workspace

(In reply to comment #6)
> i can still see the bug when backout 363198 in my local workspace
> 

What did you actually backout here? I just backed out the two patches for that bug listed in the regression range and it solved it for me.
Just thought I should add that this occurs not only in about:config, but in many sites that start with focus in a text box.
Duplicate of this bug: 368861
Summary: Cursor right-alligned in about:config → Cursor right-alligned in initially focused textboxes
I see this in gmail without the initial focus thing, and pressing "up" past the beginning/top of the textarea results in be having a non-blinking "caret" to the _right_ (outside) of the scrollbar.  Pressing down after that gets me a caret at the very _bottom_ of the textarea, which is also quite confusing.

Apparently that's this bug?  I dunno, tbh, but I wanted to comment somewhere!
(In reply to comment #10)
> I see this in gmail without the initial focus thing, and pressing "up" past the
> beginning/top of the textarea results in be having a non-blinking "caret" to
> the _right_ (outside) of the scrollbar.  Pressing down after that gets me a
> caret at the very _bottom_ of the textarea, which is also quite confusing.
> 
> Apparently that's this bug?  I dunno, tbh, but I wanted to comment somewhere!
> 

Its related for sure because we have the characteristic caret the same height as the textarea. So seems like the same bug to me (but not initially to the right which is different).
(In reply to comment #7)
> (In reply to comment #6)
> > i can still see the bug when backout 363198 in my local workspace
> > 
> 
> What did you actually backout here? I just backed out the two patches for that
> bug listed in the regression range and it solved it for me.
> 

what do you mean two patches? patch for bug 363198 is one file modified.
(In reply to comment #13)
> Bonsai shows it as two checkins:
> http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&hours=2&date=explicit&mindate=2007-01-30+11%3A29&maxdate=2007-01-30+11%3A36&cvsroot=%2Fcvsroot
> 

thanks for the explanation. i can't reprdocueo on my local workspace. feel free to reopen it when you're sure it's the regression
Duplicate of this bug: 369049
Not sure how much more sure I can get. With a clean build on my machine I can reproduce the issue (right aligned caret on textboxes and the caret growing to the full height in empty textareas when pressing the up arrow). Reverting the patch from bug 363198 and clobbering my build and I can't reproduce at all.
Blocks: 363198
The "two patches" issue was due to me checking in the wrong version of the patch, initially. Sorry about that.

I'll try to have a look at this during the weekend.
Attached patch patchSplinter Review
Always get numChildren.

I should have caught this when reviewing.
Assignee: nobody → uriber
Status: NEW → ASSIGNED
Attachment #253749 - Flags: superreview?(roc)
Attachment #253749 - Flags: review?(nian.liu)
Blocks: 368886
Comment on attachment 253749 [details] [diff] [review]
patch

an old bug brought out by a new patch. i like the way
Attachment #253749 - Flags: review?(nian.liu) → review+
(In reply to comment #19)
> (From update of attachment 253749 [details] [diff] [review])
> an old bug brought out by a new patch. i like the way
> 

It's not really an old bug. Before the patch, there was no need to initialize numChildren outside the |else| block, because it was only referred to inside that block.
Blocks: 232004
Flags: blocking1.9+
Whiteboard: [blocking1.9a2+]
Summary: Cursor right-alligned in initially focused textboxes → Cursor right-aligned in initially focused textboxes
This bug is about the caret (text insertion point), not the cursor (mouse pointer), so changing summary accordingly.
Summary: Cursor right-aligned in initially focused textboxes → Caret right-aligned in initially focused textboxes
Attachment #253749 - Flags: superreview?(roc) → superreview+
Checked in:
Checking in mozilla/layout/generic/nsSelection.cpp;
/cvsroot/mozilla/layout/generic/nsSelection.cpp,v  <--  nsSelection.cpp
new revision: 3.277; previous revision: 3.276
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.