Fennec gets focus after page load is complete while user has switched to another app/desktop on N900

VERIFIED FIXED in fennec1.0

Status

Fennec Graveyard
General
VERIFIED FIXED
8 years ago
4 years ago

People

(Reporter: Juha Seppänen, Assigned: mfinkle)

Tracking

Fennec 1.1
fennec1.0
ARM
Maemo

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; fi; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5
Build Identifier: Mozilla/5.0 (X11;U;Linux armv6l;en-US;rv:1.9.2b5pre) Gecko/20091125 Firefox/3.6b5pre Fennec/1.0b6pre

 

Reproducible: Always

Steps to Reproduce:
1. Start to load a web page in Fennec
2. Switch to another application on N900
3. Wait till page load has ended on Fennec
Actual Results:  
Fennec gets focus

Expected Results:  
N900 stays in the app that the user has selected
(Reporter)

Updated

8 years ago
Hardware: Other → ARM
Version: Trunk → 1.9.2 Branch
tracking-fennec: --- → ?
Probably caused by http://mxr.mozilla.org/mobile-browser/source/chrome/content/browser.js#2371 . Wonder why we added that...
(In reply to comment #1)
> Probably caused by
> http://mxr.mozilla.org/mobile-browser/source/chrome/content/browser.js#2371 .
> Wonder why we added that...

I think we did it to give form controls focus in the newly loaded webpage. A lot has changed with focus since then. Maybe we can remove it.
Alternatively, there are ways to focus that content without raising the window (focusing the <browser>, I think?)
I wonder if this flag can do the work :http://hg.mozilla.org/mozilla-central/file/05fba5eb6b42/dom/interfaces/base/nsIFocusManager.idl#l186 ?
The flag didn't do it...

Is there any cases where we want Fennec to raise when we call focus()?

Otherwise we could default mozilla.widget.raise-on-setfocus to false
Status: UNCONFIRMED → NEW
Ever confirmed: true
We don't want to change window.focus() behavior across the board, we just want to avoid calling it in that case. The question is whether we need to replace it with something else... what breaks if we just remove it?
Created attachment 414652 [details] [diff] [review]
patch

This patch simply removes the code the explicitly focuses the dom window. We originally did this to work around web content focus problems. For example, when google.com loads, it focuses the editbox. Fennec was not allowing that to happen, so we added this code.

The focus code in gecko has been overhauled since then. I removed the code and the editbox at google.com was focused (and yellow) after loading. I could also start typing into the editbox with needing to tap it.

Loading planet.mozilla.org (or other large web site), then switching apps did not force fennec to pop back when the page finished loading.

Score this one to Neil Deakin!
Assignee: nobody → mark.finkle
(Assignee)

Updated

8 years ago
Attachment #414652 - Flags: review?(gavin.sharp)
(In reply to comment #6)

> with something else... what breaks if we just remove it?

Nothing yet...
Attachment #414652 - Flags: review?(gavin.sharp) → review+
pushed:
https://hg.mozilla.org/mobile-browser/rev/d19f7485b029
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Post-B5
verified FIXED on build:
Mozilla/5.0 (X11; U; Linux armv7l; Nokia N900; en-US; rv:1.9.2b5pre) Gecko/20091130 Firefox/3.6b5pre Fennec/1.0b6pre
Status: RESOLVED → VERIFIED

Updated

8 years ago
Component: Linux/Maemo → General
OS: Linux → Linux (embedded)
QA Contact: maemo-linux → general
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.