Closed Bug 596619 Opened 9 years ago Closed 9 years ago

panning the page during findbar use shouldn't dismiss the findbar


(Firefox for Android Graveyard :: General, defect)

Not set



Tracking Status
fennec 2.0b2+ ---


(Reporter: madhava, Assigned: vingtetun)




(1 file)

The findbar (find in page) should not disappear just because a user is panning the page.  Quite often the user will have to pan the page to see the context of what the findbar has found.  The keyboard can certainly be dimissed, but the findbar should remain so that the user can keep finding, and can refocus the field to bring the keyboard back up.  Only tapping off of the findbar should dismiss it.
blocking2.0: --- → ?
As an aside, I don't think the Form Assistant should disappear when panning either. Just mentioning since these "bars" are related in code.
blocking2.0: ? → ---
tracking-fennec: --- → ?
OS: Mac OS X → All
Hardware: x86 → All
Version: 1.9.2 Branch → Trunk
tracking-fennec: ? → 2.0b2+
Attached patch PatchSplinter Review
The patch prevent the Find Helper to be considered as a popup. The patch also include a fix for getting the coordinate of the selection when it is in a sub-document, and an another one for not showing the title bar on some cases.
Assignee: nobody → 21
Attachment #477137 - Flags: review?(mark.finkle)
Comment on attachment 477137 [details] [diff] [review]

>diff -r 5860ea9d73d5 chrome/content/content.js
>   receiveMessage: function findHandlerReceiveMessage(aMessage) {
>-    let controller = this._selectionController.getSelection(Ci.nsISelectionController.SELECTION_NORMAL);
>-    if (!controller.rangeCount) {
>+    let selection = this._fastFind.currentWindow.getSelection();
>+    if (!selection.rangeCount) {

Add a comment above this block to let us know what this code is trying to do
>-    let range = controller.getRangeAt(0);
>     let scroll = Util.getScrollOffset(content);
>-    let rect = range.getBoundingClientRect();
>-    rect = new Rect(scroll.x + rect.left, scroll.y +, rect.width, rect.height);
>+    for (let frame = this._fastFind.currentWindow; frame != content; frame = frame.parent) {
>+      let rect = frame.frameElement.getBoundingClientRect();
>+      let left = frame.getComputedStyle(frame.frameElement, "").borderLeftWidth;
>+      let top = frame.getComputedStyle(frame.frameElement, "").borderTopWidth;
>+      scroll.add(rect.left + parseInt(left), + parseInt(top));
>+    }

Add some comments here too

>+    let rangeRect = selection.getRangeAt(0).getBoundingClientRect();
>+    let rect = new Rect(scroll.x + rangeRect.left, scroll.y +, rangeRect.width, rangeRect.height);

And here, just to complete the function
Attachment #477137 - Flags: review?(mark.finkle) → review+
Whiteboard: [fennec-checkin-postb1]
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fennec-checkin-postb1]
verified FIXED on builds:

Mozilla/5.0 (Maemo; Linux armv71; rv:2.0b6pre) Gecko/20100930 Namoroka/4.0b7pre Fennec/4.0b1pre


Mozilla/5.0 (Android; Linux armv71; rv:2.0b6pre) Gecko/20100930 Namoroka/4.0b7pre Fennec/4.0b1pre

Follow up bugs filed: 600844 , 600845, 600846
Depends on: 600844
You need to log in before you can comment on or make changes to this bug.