Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11621] Kitchen sink->Search Bar -> Focus event is getting fired alongwith blur event.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2012-12-11T00:33:44.000+0000
Affected Version/sRelease 2.1.4
Fix Version/s2012 Sprint 25, 2012 Sprint 25 API
ComponentsAndroid
Labelsqe-and214
ReporterShyam Bhadauria
AssigneeHieu Pham
Created2012-10-31T09:11:14.000+0000
Updated2013-11-07T18:27:15.000+0000

Description

This is not a regression.It exists as far as 2.0.1 The focus event should be fired on clicking 'focus search bar' button. But it do not fired. It is fired when 'blur search bar' button is pressed. Steps to reproduce: 1. Run KitchenSink 2. Go to Controls - Search Bar 3. Click the 'Focus Search Bar' button 4. Click the 'Blur Search Bar' button Expected result: 3. Search bar should be activated, keyboard should get displayed and in the console should get: [INFO] search bar: focus received 4. Search bar should be passive and in the ddms should get: [INFO] search bar:blur received Actual result: 3. No focus info is getting logged in ddms.No keyboard is displayed. 4. Search bar becomes passive and in the ddms we get: [INFO] search bar: focus received [INFO] search bar:blur received

Comments

  1. Hieu Pham 2012-12-11

    Since the SearchBar is the only focusable view in the layout, Android will always try to re-focus even after focus was removed from it. This is expected Android behavior- it will try to focus the first focusable view (top-down). One way to get around this is to set an invisible view that is focusable at the top of the layout, that way when focus is removed from the searchbar, the invisible view will get focus instead. Closing as invalid.
  2. Anshu Mittal 2013-04-11

    Closing issue since According to developer comments, this is android expected behaviour

JSON Source