From 4c64cf3b9bc093e63f132dc5d3ac817e288c08b5 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 17 Apr 2015 21:17:01 -0700 Subject: [PATCH] This should be checked before trying to focus. --- src/Posting/Captcha.fixes.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Posting/Captcha.fixes.coffee b/src/Posting/Captcha.fixes.coffee index 868da4785..a9e8bae47 100644 --- a/src/Posting/Captcha.fixes.coffee +++ b/src/Posting/Captcha.fixes.coffee @@ -31,6 +31,7 @@ Captcha.fixes = focusImage: (img) -> # XXX Image is not focusable at first in Firefox; to be refactored when I figure out why. $.asap -> + return true unless doc.contains img img.focus() - d.activeElement is img or not doc.contains img + d.activeElement is img , ->