XUL error pages should have 'Try Again' button focused, eliminating the need of additional Tab pressing

RESOLVED FIXED in mozilla12

Status

()

Core
Document Navigation
--
enhancement
RESOLVED FIXED
12 years ago
5 years ago

People

(Reporter: Sergey «Mithgol the Webmaster» Sokoloff, Assigned: wesj)

Tracking

(Depends on: 1 bug)

Trunk
mozilla12
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 3 obsolete attachments)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b3) Gecko/20050712 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b3) Gecko/20050712 Firefox/1.0+

When a XUL error page appears in Deer Park Alpha 2 (for example, Address Not
Found Error for most of domain typos), its only useful element -- the 'Try
again' button -- should be instantly focused, so that it would be possible to
reload the page with single Enter or Space key hit. It may seem useless when
dealing with Address Not Found Error, but it's a real time-saver when Net
Timeout or Document Empty (not sure about this last name) happens.

Reproducible: Always

Steps to Reproduce:
1. Follow the above given URL.
Actual Results:  
the 'Try again' button is not focused.

Expected Results:  
the 'Try again' button should have focus

Updated

12 years ago
Version: unspecified → Trunk

Comment 1

12 years ago
Reproducible with SeaMonkey/20050721, related to Core bug 280190?

Updated

12 years ago
Assignee: nobody → jruderman

Comment 2

12 years ago
Created attachment 192999 [details] [diff] [review]
patch

* Works on Mac (1.8 branch).  Not tested on Windows or Linux.
* Focusing inline didn't work (too early), and onload doesn't work according to
the comment, so I used a setTimeout.
* Doesn't steal focus from other tabs.
* Doesn't steal focus from other windows, even with dom.disable_window_flip set
to false.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

12 years ago
Component: General → Embedding: Docshell
Product: Firefox → Core

Comment 3

12 years ago
* Works on Windows (trunk).  Still not tested on Linux.
* Sometimes you can see that the button isn't focused right away, at least in a
debug build.
* On Windows, you can activate the focused button with Enter or Space.  On Mac,
only Space works.

Updated

12 years ago
Attachment #192999 - Flags: review?(cbiesinger)
> * Focusing inline didn't work (too early)

what do you mean with "too early"? Can you file a bug on that?
OS: Windows XP → All
Hardware: PC → All

Comment 5

12 years ago
Bug 232004 - Inline scripts in XHTML can't set focus (workaround: setTimeout).

Comment 6

12 years ago
Created attachment 193222 [details] [diff] [review]
patch 2

Same patch, with a comment added.
Attachment #192999 - Attachment is obsolete: true
Attachment #193222 - Flags: review?(cbiesinger)

Updated

12 years ago
Attachment #192999 - Flags: review?(cbiesinger)
Comment on attachment 193222 [details] [diff] [review]
patch 2

oh, urg... right. ok then, r=biesi. but please remove the trailing whitespace
on the empty line you're adding.
Attachment #193222 - Flags: review?(cbiesinger) → review+

Updated

12 years ago
Attachment #193222 - Flags: superreview?(bzbarsky)
Attachment #193222 - Flags: superreview?(bzbarsky) → superreview+

Updated

12 years ago
Attachment #193222 - Flags: approval1.8b4?

Updated

12 years ago
Attachment #193222 - Flags: approval1.8b4? → approval1.8b4+

Comment 8

12 years ago
Created attachment 193323 [details] [diff] [review]
patch 3

More detailed comment as suggested by bz.
Attachment #193222 - Attachment is obsolete: true

Comment 9

12 years ago
Checked in, trunk and Gecko 1.8 branch.
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED

Updated

12 years ago
Keywords: fixed1.8
Depends on: 310774
This caused regression bug 310774

Comment 11

12 years ago
Backed out, trunk and Gecko 1.8 branch, due to a regression (bug 310774). Reopening.
Status: RESOLVED → REOPENED
Keywords: fixed1.8
Resolution: FIXED → ---

Updated

12 years ago
Depends on: 311053

Comment 12

12 years ago
The regression was due to bug 311053.  One possible workaround is to turn the
<xul:button> in netError.xhtml into an <html:button>, but that would change its
appearance, especially on Mac OS X.

The right way to fix this is to fix bug 311053 and then re-apply the patch in
this bug.
*** Bug 333151 has been marked as a duplicate of this bug. ***
QA Contact: general → docshell
*** Bug 358485 has been marked as a duplicate of this bug. ***

Updated

11 years ago
Depends on: 175279

Updated

10 years ago
Assignee: jruderman → nobody
Status: REOPENED → NEW

Updated

10 years ago
Duplicate of this bug: 402870

Updated

9 years ago
Blocks: 451250

Comment 16

8 years ago
Bug 311053 has been fixed.  Time to try again?
(Assignee)

Comment 17

5 years ago
Created attachment 589399 [details] [diff] [review]
Patch
Assignee: nobody → wjohnston
Attachment #193323 - Attachment is obsolete: true
Attachment #589399 - Flags: review?(bzbarsky)
Comment on attachment 589399 [details] [diff] [review]
Patch

r=me.  Please test well!
Attachment #589399 - Flags: review?(bzbarsky) → review+
(Assignee)

Comment 19

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/b9fe3e1419c6
Whiteboard: [inbound]
https://hg.mozilla.org/mozilla-central/rev/b9fe3e1419c6
Status: NEW → RESOLVED
Last Resolved: 12 years ago5 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla12
(In reply to Jesse Ruderman from comment #16)
> Bug 311053 has been fixed.  Time to try again?
So after all that, the button got turned into an HTML button anyway ;-)

Updated

5 years ago
Depends on: 748803

Updated

5 years ago
Depends on: 749218
Depends on: 748787

Comment 22

5 years ago
There appears to be an unfortunate interaction between this change and iframes.

Many users apparently redirect tracking hosts to 127.0.0.1 using the Windows hosts file. Pages often make calls to these hosts using a zero width, zero height iframe. When the page loads, Firefox now scrolls the page to the location of the iframe which is both annoying and, when the iframe is not visible, incomprehensible.

Related new bug: https://bugzilla.mozilla.org/show_bug.cgi?id=751297

Focusing the Try Again button in an iframe is not especially useful because if the user cannot already see the button, it probably is not an important source of content on the page.

SuMo thread: https://support.mozilla.org/en-US/questions/892998 - many example URLs on page 2 for user who installed MVPS HOSTS file from http://winhelp2002.mvps.org/hosts.txt - my comments on this analysis: https://support.mozilla.org/en-US/questions/892998?page=3#answer-335119

It would be nice to disable autofocus="true" on the Try Again button in iframes, at least on iframes that are too small for the button to be displayed.

(Apologies for commenting on a closed bug, but I didn't see a better place to raise this.)

Comment 23

5 years ago
Jefferson, the patch in bug 748803 should take care of that.
You need to log in before you can comment on or make changes to this bug.