Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10574] MobileWeb: HintText functionality is broken

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2012-09-11T10:25:39.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsMobileWeb
Labelsapi
ReporterSehyo Chang
AssigneeNeeraj Gupta
Created2012-08-20T14:01:48.000+0000
Updated2014-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

FileDateSize
TC10374.zip2012-08-20T14:01:48.000+00003839014

Comments

  1. Bryan Hughes 2012-08-21

    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.
  2. Sehyo Chang 2012-08-21

    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
  3. Bryan Hughes 2012-09-11

    This ticket is a duplicate of TIMOB-10639

JSON Source