#213 new
lsinger

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

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.

New-ticket Create new ticket

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.

Shared Ticket Bins

People watching this ticket

Attachments

Pages