Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Exception for CPSecureTextField set to isEditable: YES

#213

When I create a CPSecureTextField with setEditable: YES (so it acceptsFirstResponder), Safari 3.2.1 and WebKit 5525.27.1 will throw a "NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7" the moment onblur is called.

onblur is defined in CPTextField's becomeFirstResponder method. In the onblur function definition, setObjectValue is being called.

setObjectValue tries to set _DOMTextElement.innerText to displayString, if CPFeatureIsCompatible(CPJavascriptInnerTextFeature) returns true. It does, and the setting of innerText then throws the exception.

Since this only happens for input elements with type set to password (CPSecureTextField, that is) and I haven't checked with other browsers, I'm not sure what to do. A quick fix would be to check for _DOMTextElement.type != "password", ANDing it with the CPFeatureIsCompatible(CPJavascriptInnerTextFeature) check.

But I doubt that would be clean. Since I'm not familiar with CPCompatibility, someone more knowledgable in this regard should look into how to fix this.

What I want to do is have the password field call an action on a target to process a login when hitting the return key. I couldn't get this to work without setEditable set to YES.

Reported by lsinger · January 30th, 2009 @ 03:20 AM

State: new
Milestone: none
Assigned to: nobody

Activity

  1. ronin-756 (at lighthouseapp)
    ronin-756 (at lighthouseapp)
    • Tag changed from appkit, bug, cpcompatibility, cpsecuretextfield, cptextfield to @needtest, @to-review, appkit, bug, cpcompatibility, cpsecuretextfield, cptextfield

    a patch has been submitted here : http://github.com/lsinger/cappuc...

    February 14th, 2009 @ 08:19 AM

  2. Chandler Kent
    Chandler Kent
    • Tag changed from @needtest, @to-review, appkit, bug, cpcompatibility, cpsecuretextfield, cptextfield to @to-review, appkit, bug, cpcompatibility, cpsecuretextfield, cptextfield

    I have written a simple test case for this bug. The bug exists in the 0.6 release. It has been tested on Windows XP versions of Safari 4 (Beta), Chrome 1.0.154.48, and Firefox 3.0.7 (Firebug does not report any error).

    Here is the gist to reproduce:

    http://gist.github.com/81140

    An AppController.j file has been attached.

    March 18th, 2009 @ 04:25 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.