Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13904] MobileWeb: TextArea with hint text

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2017-06-26T22:14:56.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsMobileWeb
Labelsparity
ReporterMatej
AssigneeUnknown
Created2013-05-17T18:36:35.000+0000
Updated2018-04-04T23:20:27.000+0000

Description

*Problem* Please can you add support of "Hint text" property in TextArea component also for Mobile Web? Now it is working only on Android and I don't understand why. In my app I have a nice form with normal TextField's (with hint text) and on the end of the form I've got a TextArea, which is without hint text, so it looks inconsistent. There is a workaround by manually checking the values, but this is inconvenient. *Workaround*
var textArea = Titanium.UI.createTextArea({
	value : 'Enter Text',
});
textArea._hintText = textArea.value;

textArea.addEventListener('focus', function(e) {
	if (e.source.value == e.source._hintText) {
		e.source.value = "";
	}
});
textArea.addEventListener('blur', function(e) {
	if (e.source.value == "") {
		e.source.value = e.source._hintText;
	}
});

Comments

  1. Lee Morris 2017-06-26

    Resolving as "Won't Fix" as MobileWeb has been deprecated.
  2. Eric Merriman 2018-04-04

    Closing as will not fix.

JSON Source