Exception for CPSecureTextField set to isEditable: YES
Reported by lsinger | January 30th, 2009 @ 03:20 AM
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.
Comments and changes to this ticket
-
ronin-756 (at lighthouseapp) February 14th, 2009 @ 08:19 AM
- 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...
-
Chandler Kent March 18th, 2009 @ 04:25 AM
- 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:
An AppController.j file has been attached.
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
The Cappuccino Web Framework, including AppKit, Foundation, and Objective-J.