Closed Bug 572236 Opened 15 years ago Closed 15 years ago

urlbar not focused after mousedown inside editarea and mouseup inside textbox

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mbrubeck, Assigned: mbrubeck)

References

Details

Attachments

(1 file, 2 obsolete files)

Steps to reproduce: 1. Begin a touch (or click) inside the white "urlbar-editarea" hbox but outside the actual textbox (e.g. slightly above or below the text). 2. Drag into the textbox and then raise your finger (or mouse button). Actual results: Nothing happens. Expected results: urlbar is focused It seems to be generally true that "click" is not fired for clicks that start in a container and end in one of its children (although the reverse sometimes works). See http://people.mozilla.com/~mbrubeck/test/container-click.html for a simple test case. So we might need to handle this ourselves using mousedown/mouseup events instead of click (and mouseout to cancel).
Attached patch patch (obsolete) — Splinter Review
This patch fixes the issue, but it introduces a new one: mouseout to cancel the click does not work if the click starts inside the textbox's html:input. This is caused by bug 574116. We might want to land this patch anyways, since failing to cancel is not as bad as failing to click (cancelling is the uncommon case), and I haven't found any workaround for this problem.
Assignee: nobody → mbrubeck
Status: NEW → ASSIGNED
Attachment #453480 - Flags: review?(mark.finkle)
(In reply to comment #1) > This patch fixes the issue, but it introduces a new one: mouseout to cancel the > click does not work if the click starts inside the textbox's html:input. It turns out this is not a new problem: it happens both with and without the patch. So the patch fixes this bug without creating any new ones.
Attached patch alt patch (obsolete) — Splinter Review
Your patch is a bit complex. Can you try this patch instead? It removes the urlbar-editarea and just makes the textbox the right size and style.
Attachment #453659 - Flags: review?(mbrubeck)
Comment on attachment 453659 [details] [diff] [review] alt patch (In reply to comment #3) > Your patch is a bit complex. Can you try this patch instead? It removes the > urlbar-editarea and just makes the textbox the right size and style. I like this change because it simplifies the code, but it doesn't fix this bug. The html:input inside of the textbox still does not fill the whole area, and I can still reproduce the bug by pressing outside the html:input and releasing inside it. I tried expanding the html:input to fill the whole area, but it messes up the positioning of the text. (Vivien suggested that the vertical position might be fixed with line-height, which I haven't tried yet. And maybe text-indent could fix the horizontal position.)
Attachment #453659 - Flags: review?(mbrubeck) → review+
Attached patch alt alt patchSplinter Review
This patch works except that the blinking cursor in the textbox is weirdly sized when there is no text.
Attachment #453726 - Flags: review?(mark.finkle)
Attachment #453726 - Flags: review?(mark.finkle) → review+
Attachment #453480 - Attachment is obsolete: true
Attachment #453480 - Flags: review?(mark.finkle)
Attachment #453659 - Attachment is obsolete: true
We can work on the cursor in a followup. The patch itself looks good and works fine, except for the caret height issue pushed: http://hg.mozilla.org/mobile-browser/rev/20b2ce6c2fd5
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Depends on: 574492
Depends on: 574737
Verified fixed on: Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110921 Firefox/9.0a1 Fennec/9.0a1 Device: Samsung Galaxy S OS: Android 2.2
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: