Closed Bug 889173 Opened 12 years ago Closed 11 years ago

Very slow when moving cursor in Android text area

Categories

(Firefox for Android Graveyard :: Text Selection, defect)

22 Branch
ARM
Android
defect
Not set
normal

Tracking

(fennec+)

RESOLVED WORKSFORME
Tracking Status
fennec + ---

People

(Reporter: rafaelluik, Assigned: jchen)

Details

(Keywords: perf)

User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36 OPR/15.0.1147.100 (Edition Next) Steps to reproduce: Device: HTC EVO 3D - stock Android 4.0.3 update with HTC Sense 3.6 Type some text in a text area in a webpage, then move the cursor by dragging the handler below the text. Actual results: The cursor will move very slowly, you'll be able to watch it moving for a long time. Expected results: It shouldn't have this lag when moving the cursor, it's meant for fine precision and the response time it has now (terrible lag) kills the purpose.
OS: Windows 8 → Android
Hardware: x86_64 → ARM
Summary: Very slow when moving cursor in Android text aera → Very slow when moving cursor in Android text area
Which version of Firefox are you testing with, and which Android keyboard? Do you see the same issue in Nightly for Android? (http://nightly.mozilla.org)?
I used Firefox 22 final from the Play Store but I downloaded the Nightly you recommended for testing (25.0a1) and the lag is still present. You can literally watch the cursor moving after you drag it. Stock HTC keyboard.
Setting a reminder to look at this with our Evo 3D.
Flags: needinfo?(kbrosnan)
Thanks, it has about 2 other issues with text input. Should I file different bug reports for them?
Each bug should be one single issue. Yes, file separate bugs.
I get this exact issue too. It can make editing text literally impossible. For example, in a single-line text field which contains too much text, where the only way to scroll horizontally is to drag the cursor left or right. My impression is that the text field receives and queues the "requests to scroll" at interactive rates, but for some reason takes a few seconds to process each one and redraw itself, and it can't be interrupted, so you have to wait quite a long time to see how far you actually scrolled. Even a very brief touch/drag action can eventually result in a scroll all the way to the other end of the text field, so you can't read or edit the text in the middle. Hope that makes sense. This is on Firefox 22 final from the Play Store. CyanogenMod 10.1 (Android 4.1.2) on a Samsung Galaxy S (GT-I9000). Verified with both the Swype keyboard and the AOSP keyboard.
I agree that moving the text selection cursor around is super painful, specially on slow devices. We should try to coalesce the TextSelection:Move events that get sent from TextSelectionHandle.java to browser.js. One way to do this would be to have a custom Event object and do the coalescing in nsAppShell.cpp. A simpler way would be to have an "ack" sent back from browser.js to TextSelectionHandle when it has finished processing a move event, and only dispatch the next move once that ack is received.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: perf
So are the problems just with moving the cursor, not adjusting regular text selection? The cursor is the only remaining text selection thing that we still position with fake mouse events, so this may get better if we ever finish bug 864582. I haven't revisited that in a while because it was blocked (and I think still is blocked) on improvements to the caretPositionFromPoint API. But it may be worth trying to apply the patch in there to see if that helps with performance before investing too much time in a different solution.
just want to add that I'm having the same problem. I'm on version 23.0. text boxes like Google our bing search just get super laggy.
I've got the same issue as well on both my device, one being a Galaxy S2 (i9100) and the other being the new Nexus 7 (2nd gen). What I also noticed is that after you moved the cursor somewhere in the text field it may happen that as soon as you enter a character the letter suddenly spawns somewhere else instead of where the cursor is, which is actually more annoying for me than the cursor lag (i can see the cursor lag that hard that it moves where i pressed for seconds later both on my Galaxy S2 and Nexus 7 just as the OP described) though that doesn't happen always. I think I've tested every major browser that's available for Android through the playstore and Firefox is the only one which has this problem. Every other browser moves the cursor just like you'd expect from any other app.
Forgot to mention that on my S2 it happens on both stock Rom with stock kernel and on CM10.2. I use stock Google Rom on my Nexus 7.
Nightly Build, Beta and latest version from Playstore on Nexus 7 (1st gen) with Android 4.3 Stock ROM > same laginess and weird behaviour with cursor when moving cursor elsewhere after typing some text (see comment #10). Really annoying while using textareas like this. Sometimes whole paragraphs are deleted when inserting text in textareas and other types of input boxes.
tracking-fennec: --- → ?
Jim, let's profile this and see what's going on
Assignee: nobody → nchen
tracking-fennec: ? → +
Flags: needinfo?(kbrosnan)
Status: NEW → ASSIGNED
Is this still an issue? I could not reproduce this on my Nexus 4 running Android 4.4 using Nightly.
Flags: needinfo?
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: needinfo?
Resolution: --- → WORKSFORME
This may have come up again but may be specific to devices, for more investigation a user has reported this here: https://support.mozilla.org/en-US/questions/1037538
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.