From beaf66702baa22ca35984ddb3942086baed2e8c7 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 21 Nov 2015 00:47:13 -0800 Subject: [PATCH] Work around apparent Firefox bug preventing focusing on captcha iframe. --- src/Posting/Captcha.v2.coffee | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Posting/Captcha.v2.coffee b/src/Posting/Captcha.v2.coffee index 881426868..1e0e8c75b 100644 --- a/src/Posting/Captcha.v2.coffee +++ b/src/Posting/Captcha.v2.coffee @@ -73,9 +73,11 @@ Captcha.v2 = return @reload() if @nodes.container - if d.activeElement is @nodes.counter and (iframe = $ 'iframe', @nodes.container) - iframe.focus() - QR.focus() # Event handler not fired in Firefox + # XXX https://bugzilla.mozilla.org/show_bug.cgi?id=1226835 + $.queueTask => + if @nodes.container and d.activeElement is @nodes.counter and (iframe = $ 'iframe', @nodes.container) + iframe.focus() + QR.focus() # Event handler not fired in Firefox return @nodes.container = $.el 'div', className: 'captcha-container'