Closed Bug 655852 Opened 14 years ago Closed 14 years ago

Typing past the boundaries of the textbox will start clearing the beginning characters, instead of scrolling

Categories

(Firefox for Android Graveyard :: General, defect, P3)

ARM
Android
defect

Tracking

(firefox5 fixed, fennec5+)

VERIFIED FIXED
Firefox 6
Tracking Status
firefox5 --- fixed
fennec 5+ ---

People

(Reporter: nhirata, Assigned: stechz)

References

()

Details

(Whiteboard: patch is all in mobile-only code)

Attachments

(4 files, 2 obsolete files)

Attached image screenshot
Aurora Branch:
Mozilla/5.0 (Android; Linux armv71; rv5.0a2) Gecko/20110509 Firefox/5.0a2 Fennec/5.0a2
Device: Thunderbolt
OS: Android 2.2

1. go to people.mozilla.com/~nhirata/html_tp/formsninput.html
2. click in the first text field
3. type in anything, but keep typing until you get past the border of the text field

Expected: the text will scroll and the cursor will be at the end of the text field
Actual: the text starts disappearing from the left side and you can't see what you're typing
Does not seem to happen in Nightly trunk
Summary: Typing past the boundaries of the textbox will start clearing the beginning characters, instead of scrolling. → Aurora : Typing past the boundaries of the textbox will start clearing the beginning characters, instead of scrolling.
tracking-fennec: --- → 5+
(In reply to comment #1)
> Does not seem to happen in Nightly trunk

See bug 656272
Summary: Aurora : Typing past the boundaries of the textbox will start clearing the beginning characters, instead of scrolling. → Typing past the boundaries of the textbox will start clearing the beginning characters, instead of scrolling
is this android only? or IME only?
Seems to be ok for 3/16;3/17 breaks

Mozilla/5.0 (Android; Linux armv71; rv2.0b13pre) Gecko/20110317 Firefox/4.0b13pre Fennec/4.0b6pre
Device: Thunderbolt
OS: Android 2.2

steps to reproduce changes slightly: 
1. go to reader.google.com
2. in the login field type stuff to go past the field length
3. in the password field type stuff to go past the field length
4. go back to the login field and type stuff to go past the field length.

Expected: the text will scroll and the cursor will be at the end of the text field
Actual: the text starts disappearing from the left side and you can't see what you're typing
blassey: nhirata: if you long press the user name field (for bug 655852) and select all and then copy
[11:07am] blassey: does that give you the full text?
[11:08am] nhirata: let me check
[11:10am] nhirata: it gives the full text
Attached image screenshot
blassey: does it reproduce on desktop?
[11:14am] nhirata: it reproduces on the mac version of fennec.
[11:14am] nhirata: today's nightly

Screenshot attached
Attached video screen recording
Slight adjustment to the steps.  You have to position the cursor past the boundary of the field in order to see the behavior.  see screen recording.
This does happen in nightly trunk (you need to tap and pan the scrollbox first), and I think this would have been an issue ever since panning overflow elements landed in bug 618975. Mark and I have confirmed this is an issue on 4.0.1, though for some reason it is harder to reproduce.
The reason this happens is that asynchronous scrolling requires us to watch for content process scroll events for anything we set a displayport on. We need to update the content views to reflect the new scroll position. This is actually a problem for anything (iframes, divs, etc.) but it's especially noticable on input boxes because typing does generate scrolls.

For now, the easiest fix is to stop setting displayports for text elements.
Assignee: nobody → ben
Attachment #532375 - Flags: review?(mbrubeck)
Comment on attachment 532375 [details] [diff] [review]
Typing past the boundaries of the textbox will start clearing the beginning characters, instead of scrolling

>+        let binding = element.ownerDocument.getBindingParent(element);
>+        if (binding && binding.querySelectorAll("input"))
>+          break;

I don't think you want querySelectorAll here, since that will include descendants of the parent element.

In content.js we use this code to test for text fields and text areas:

if ((elem instanceof Ci.nsIDOMHTMLInputElement && elem.mozIsTextField(false))
    || elem instanceof Ci.nsIDOMHTMLTextAreaElement)
Attachment #532375 - Flags: review?(mbrubeck) → review+
This patch intentionally removes the ability to pan text fields by dragging them.  (This ability was added in bug 618975.)  If we land this, we'll need a followup to re-enable this capability with the bugs fixed.
Blocks: 657054
Attachment #532375 - Flags: approval-mozilla-aurora?
Not sure if this is more satisfactory, but I tried something different and
checked if the bit flag is set. This looks similar to what FrameLayerBuilder
does in StoreNewDisplayItemData so I thought it might work. Let me know if I
need to do this as per your suggestion.
Attachment #533094 - Flags: review?(roc)
Attachment #532375 - Attachment is obsolete: true
Attachment #532375 - Flags: approval-mozilla-aurora?
Comment on attachment 533094 [details] [diff] [review]
Typing past the boundaries of the textbox will start clearing the beginning characters, instead of scrolling

Messed up, sorry.
Attachment #533094 - Attachment is obsolete: true
Attachment #533094 - Flags: review?(roc)
Attachment #533098 - Flags: review+
Pushed http://hg.mozilla.org/mozilla-central/rev/659100d22758
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Attachment #533098 - Flags: approval-mozilla-beta?
Attachment #533098 - Flags: approval-mozilla-aurora?
Target Milestone: --- → Firefox 6
Whiteboard: patch is all in mobile-only code
Verified:
Mozilla/5.0 (Android; Linux armv71; rv6.0a1) Gecko/20110519 Firefox/6.0a1 Fennec/6.0a1
Device: Droid 2 
OS: Android 2.2

Mozilla/5.0 (Android; Linux armv71; rv6.0a1) Gecko/20110519 Firefox/6.0a1 Fennec/6.0a1
Device: Thunderbolt
OS: Android 2.2
Status: RESOLVED → VERIFIED
Comment on attachment 533098 [details] [diff] [review]
Typing past the boundaries of the textbox will start clearing the beginning characters, instead of scrolling

Approving this but it sure would be nice to have someone from mobile in these meetings doing the risk analysis part.
Attachment #533098 - Flags: approval-mozilla-beta?
Attachment #533098 - Flags: approval-mozilla-beta+
Attachment #533098 - Flags: approval-mozilla-aurora?
Comment on attachment 533098 [details] [diff] [review]
Typing past the boundaries of the textbox will start clearing the beginning characters, instead of scrolling

Please land this change on both Aurora and Beta. (In the future, getting changes in during Aurora will save you this extra step.)
Attachment #533098 - Flags: approval-mozilla-aurora+
Target Milestone: Firefox 6 → Firefox 5
Target Milestone: Firefox 5 → Firefox 6
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: