Changeset [ec0cd22c1d3457fc898dc4be1b2557d988995a99] by Alexander Ljungberg
November 9th, 2011 @ 10:43 AM
Merge pull request #1382 from kjamieson/cappuccino
Currently CPTextField only updates its internal string value from the actual HTML input element on a keyUp event. If the CPTextField loses focus before the keyUp event is received, the internal value does not get updated and any text entered since the last keyUp event is lost.
This is easily reproduced when editing a text field by quickly entering text and hitting the enter/return key to insert a new line (before the keyUp event has fired), or when holding down a key (to repeatedly enter the same character), and then tabbing out of the text field -- the value gets reset to whatever the value was before the key was held down.
This fix changes CPTextField#insertNewLine and
CPTextField#resignFirstResponder to reload the string value from
the input element if it has changed (in the same way as if a keyUp
event had been triggered)
https://github.com/cappuccino/cappuccino/commit/ec0cd22c1d3457fc898...
Committed by Alexander Ljungberg
- M AppKit/CPTextField.j
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.