[TIMOB-11621] Kitchen sink->Search Bar -> Focus event is getting fired alongwith blur event.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-12-11T00:33:44.000+0000 |
Affected Version/s | Release 2.1.4 |
Fix Version/s | 2012 Sprint 25, 2012 Sprint 25 API |
Components | Android |
Labels | qe-and214 |
Reporter | Shyam Bhadauria |
Assignee | Hieu Pham |
Created | 2012-10-31T09:11:14.000+0000 |
Updated | 2013-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
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.
Closing issue since According to developer comments, this is android expected behaviour