Closed Bug 803078 Opened 12 years ago Closed 12 years ago

Text selection "cursor" handle persists across tab switches

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox20 verified)

VERIFIED FIXED
Firefox 20
Tracking Status
firefox20 --- verified

People

(Reporter: kats, Assigned: rasivasu)

References

Details

(Whiteboard: [mentor=margaret][lang=js])

Attachments

(1 file, 2 obsolete files)

STR: 1. Open a tab with some page (e.g. mozilla.org) 2. In a new tab, go to a page with an input field (e.g. bugzilla.mozilla.org) 3. Click on the input field (and maybe scroll the page a bit) so that the orange cursor image is visible 4. Switch tabs Expected results: The orange cursor image disappears Actual results: The orange cursor image is overlaid on the other tab (mozilla.org)
Blocks: 652168
Looks like we only get rid of selection handles on a "Tab:Selected" event, not get rid of the cursor as well: http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js#1652 We should add a this.hideThumb() call if _activeType is TYPE_CURSOR in this case.
Whiteboard: [mentor=margaret][lang=js]
Hi Margaret, Would you please assign this bug to me and send me instruction to fix it? Thanks, Ravi
Assignee: nobody → rasivasu
Flags: needinfo?(margaret.leibovic)
(In reply to Ravisankar Sivasubramanaim from comment #2) > Would you please assign this bug to me and send me instruction to fix it? Sure! Do you have a build environment set up? If not, you should follow the instructions here: https://wiki.mozilla.org/Mobile/Fennec/Android#Building_Fennec After that, you should see if you can reproduce the issue on your own build, then you'll just need to add a call to hide the thumb if it's active when we observe a "Tab:Selected" event in SelectionHanlder's observe method. Find me on IRC if you have issues! Sorry I was a bit slow to respond last time :(
Flags: needinfo?(margaret.leibovic)
Attached patch Added code to hide thumb for cursor. (obsolete) (deleted) — Splinter Review
Attachment #682872 - Flags: review?(margaret.leibovic)
Attached patch Added code to hide thumb for cursor. (obsolete) (deleted) — Splinter Review
Attachment #682886 - Flags: review?(margaret.leibovic)
Hi Margaret, Would you please review this patch? Thanks, Ravi
Status: NEW → ASSIGNED
Comment on attachment 682872 [details] [diff] [review] Added code to hide thumb for cursor. This looks like an accidental attachment. Marking as obsolete. I'll review the patch that was attached :)
Attachment #682872 - Attachment is obsolete: true
Attachment #682872 - Flags: review?(margaret.leibovic)
Comment on attachment 682886 [details] [diff] [review] Added code to hide thumb for cursor. Review of attachment 682886 [details] [diff] [review]: ----------------------------------------------------------------- Awesome! Thanks for the patch! I just have one small comment. If you upload a new patch with that change I can land it for you. Also, please read this page about how to properly format your patch so that it's ready to be checked in: https://developer.mozilla.org/en-US/docs/Creating_a_patch_that_can_be_checked_in ::: mobile/android/chrome/content/browser.js @@ +1660,5 @@ > // Knowing when the page is done drawing is hard, so let's just cancel > // the selection when the window changes. We should fix this later. > this.endSelection(); > + } else if (this._activeType == this.TYPE_CURSOR) { > + // Hide the cursor if a new window is selected Nit: Update this comment to "Hide the cursor if the window changes." since this code also runs for the "Window:Resize" event.
Attachment #682886 - Flags: review?(margaret.leibovic) → review+
Attachment #684432 - Flags: review?(margaret.leibovic)
Attachment #684432 - Flags: review?(margaret.leibovic) → review+
Attachment #682886 - Attachment is obsolete: true
Thanks for the patch! I landed it on mozilla-inbound, so it will be merged into mozilla-central within a day, and it will be part of Firefox 20! https://hg.mozilla.org/integration/mozilla-inbound/rev/45c61a3e9678
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
The cursor handle doesn't persist any more on the latest Nightly build. Closing bug as verified fixed on: Firefox 20.0a1 (2012-11-28) Device: Galaxy Nexus OS: Android 4.1.1
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: