[TIMOB-10574] MobileWeb: HintText functionality is broken
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-09-11T10:25:39.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | n/a |
Components | MobileWeb |
Labels | api |
Reporter | Sehyo Chang |
Assignee | Neeraj Gupta |
Created | 2012-08-20T14:01:48.000+0000 |
Updated | 2014-01-28T23:48:58.000+0000 |
Description
The fix for issue TIMOB-10374 broke hintText functionality.
See attached test case file TC10374.zip. If I click button, correct value should be 'postValue'. Instead field value is 'empty. I tried when view is opened. Same result.
Broken functionality:
(1) Create TextField object with hintText
(2) Set the value of the textfield with some other value (either after window as opened and before)
(3) This clears the hintText and also set the value to be empty. Now if I get back value, it returns the empty
This used to be working in 2.1.1 GA.
Confirmed on Safari 6
Attachments
File | Date | Size |
TC10374.zip | 2012-08-20T14:01:48.000+0000 | 3839014 |
I cannot confirm the described behavior with the attached application. Please create a minimum viable test case that clearly demonstrates the behavior. Note that the behavior of hint text has changed: now whenever a text field gains focus, the hint text disappears by design.
Environment: Safari 6. If click the field(focus), I am seeing empty value. It should be filled with 'postValue'. And if I retrieved the field value, I get empty string. I traced the source code and verified the statement. Here is offending change: https://github.com/bryan-m-hughes/titanium_mobile/commit/22d1a5d1d895f6f328c0eb97c4152c8f5dcfd747 ------------------------------------------- - return this._field.value; 130 + return this._showingHint ? "" : this._field.value; --------------------------------------------- So if there is showingHint set, it returns empty value
This ticket is a duplicate of TIMOB-10639