Note that there are some explanatory texts on larger screens.

plurals
  1. POCappuccino: Keyboard events getting squashed in reCAPTCHA input field
    primarykey
    data
    text
    <p>I'm integrating a reCAPTCHA into my Cappuccino app and I have it all working besides this odd input functionality in the reCAPTCHA input text field: Only some keys seem to work, "qwrszcv" and a few other letters work fine, but most other keys don't work.</p> <p>I borrowed some of the mapkit code to inject the reCAPTCHA script file in the head, then I inject the reCAPTCHA div into a custom CPView class I made.</p> <p>Here is my constructor code:</p> <pre><code>- (id)initWithFrame:(CGRect)aFrame { self = [super initWithFrame:aFrame]; if (self != nil) { var DOMScriptElement = document.createElement("script"); DOMScriptElement.src = "http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"; DOMScriptElement.type = "text/javascript"; document.getElementsByTagName("head")[0].appendChild(DOMScriptElement); needsInitialization = YES; console.log(self); } return self; } </code></pre> <p>And my initialization code:</p> <pre><code>- (id)initializeRecaptcha { if (needsInitialization) { DOMRecaptchaElement = document.createElement("div"); DOMRecaptchaElement.id = "recaptcha_div_id"; var style = DOMRecaptchaElement.style, bounds = [self bounds], width = CGRectGetWidth(bounds), height = CGRectGetHeight(bounds); style.overflow = "hidden"; style.position = "absolute"; style.visibility = "visible"; style.zIndex = 0; style.left = "0px"; style.top = "0px"; style.width = width + "px"; style.height = height + "px"; _DOMElement.appendChild(DOMRecaptchaElement); window.Recaptcha.create("my-recaptcha-key", "recaptcha_div_id", { theme: "clean", callback: window.Recaptcha.focus_response_field } ); needsInitialization = NO; } else { window.Recaptcha.reload(); } } </code></pre> <p>I figure it has something to do with the way Cappuccino propagated events, but for the life of me I can't figure out a way to get this input to work.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload