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
Reproducible with SeaMonkey/20050721, related to Core bug 280190?
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.
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.
> * Focusing inline didn't work (too early) what do you mean with "too early"? Can you file a bug on that?
Bug 232004 - Inline scripts in XHTML can't set focus (workaround: setTimeout).
Created attachment 193222 [details] [diff] [review] patch 2 Same patch, with a comment added.
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.
12 years ago
Created attachment 193323 [details] [diff] [review] patch 3 More detailed comment as suggested by bz.
Checked in, trunk and Gecko 1.8 branch.
12 years ago
This caused regression bug 310774
Backed out, trunk and Gecko 1.8 branch, due to a regression (bug 310774). Reopening.
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. ***
*** Bug 358485 has been marked as a duplicate of this bug. ***
Bug 311053 has been fixed. Time to try again?
Created attachment 589399 [details] [diff] [review] Patch
Comment on attachment 589399 [details] [diff] [review] Patch r=me. Please test well!
(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 ;-)
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.)
Jefferson, the patch in bug 748803 should take care of that.