Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27754] SearchBar text color and hinTextColor does not work properly.

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2020-04-09T14:50:48.000+0000
Affected Version/sRelease 8.3.1
Fix Version/sRelease 9.0.1
ComponentsiOS
Labelsescalation
ReporterNazmus Salahin
AssigneeVijay Singh
Created2020-02-08T07:12:50.000+0000
Updated2020-06-10T13:03:55.000+0000

Description

We have tested this issue using the attached sample code with ti SDK 8.3.1.GA iPhone 11 Pro Max(ios 13.3) simulator. I assigned a red color to the color attribute and also a red color for hintTextColor. Neither the hintTextColor nor color changes the color of the text. *Code:* *index.js*
$.index.open();
*index.xml*
<Alloy>
	<Window class="container">
		<SearchBar id="search" color="red" barColor="gray" showCancel="true" height="43" top="100" hintText= "Enter value ..."
		hintTextColor= "red" />
	</Window>
</Alloy>
*Test steps*: 1. Open Studio and create a new alloy project. 2. Copy index.xml and index.js code and paste your project. 3. Run the project on iPhone or simulator. 4. Then observe the search bar. *Test Output*: Please check the attachment section. Thanks.

Attachments

FileDateSize
Simulator Screen Shot - iPhone 11 Pro Max - 2020-02-08 at 13.10.39.png2020-02-08T07:11:10.000+000083974
TIMOB-27754-iOS10.zip2020-03-18T15:27:41.000+00008660863
TIMOB-27754-iOS13.zip2020-03-18T15:27:51.000+00008660873

Comments

  1. Vijay Singh 2020-02-21

    PR - https://github.com/appcelerator/titanium_mobile/pull/11494
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var searchBar = Ti.UI.createSearchBar({
       	color: 'red',
       	barColor: 'gray',
       	showCancel: 'true',
       	hintTextColor: 'red',
       	hintText: 'Enter Value',
       	height: 43,
       	top: 100
       });
       
       win.add(searchBar);
       win.open();
       
       
  2. Sohail Saddique 2020-03-18

    *FR Failed* See attached test cases. In summary: * *iOS 10* - If _showCancel_ property is set (either true or false), then the _color_ property will not work as expected if used as a standalone SearchBar. This issue does not affect the classic version, only in Alloy/TSS. * *iOS 13* - If SearchBar is used within a ListView, then _hintTextColor_ property will not work. This does not affect TableView or as a standalone SearchBar. [^TIMOB-27754-iOS10.zip] [^TIMOB-27754-iOS13.zip]
  3. Vijay Singh 2020-03-18

    [~ssaddique] What is behavior without this PR? Do issues, mentioned by you, exist without this PR?
  4. Sohail Saddique 2020-03-18

    [~vijaysingh] * iOS 10 - Same behaviour * iOS 13:

    Standalone - _hintTextColor_ and _color_ do not work at all

    ListView and TableView - hintTextColor applies when you first tap the search field. On first launch, the hintTextColor is not displaying as expected. _color_ property doesn't work at all.

    Tested with 8.3.1.GA
  5. Vijay Singh 2020-03-19

    [~ssaddique] As iOS 10 issue is independent of this issue, can you create a new ticket for that? I have fixed iOS 13 related issue. You can verify again. Thanks!
  6. Sohail Saddique 2020-03-19

    [~vijaysingh] Sure. I have verified the changes and can confirm that the properties in iOS 13 are fully functional now.
  7. Sohail Saddique 2020-03-20

    *FR Passed* *Test Environment* SDK Ver: 8.3.1.GA and 9.1.0 (this PR) OS Ver: 10.14.6 Xcode Ver: Xcode 11.3.1 Appc NPM: 5.0.0 Appc CLI: 8.0.0 Daemon Ver: 3.2.0 Ti CLI Ver: 5.2.2 Alloy Ver: 1.14.6 Node Ver: 10.17.0 Simulators: iPhone 11 Pro Max (13.3), iPhone XS (12.4), iOS11 and iOS 10
  8. Vijay Singh 2020-03-25

    PR (9_0_X) - https://github.com/appcelerator/titanium_mobile/pull/11566
  9. Samir Mohammed 2020-03-31

    Reopening as 9_0_X needs testing and merging.
  10. Samir Mohammed 2020-04-08

    FR Passed for 9_0_X as well
  11. Samir Mohammed 2020-04-09

    *Closing ticket.* Fix verified in SDK version 9.1.0.v20200406120646. and 9.0.1.v20200408050151 Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/11494 - Master PR (9_0_X) - https://github.com/appcelerator/titanium_mobile/pull/11566

JSON Source