[TIMOB-6367] Android: searchBar.blur() - v8/rhino - Blurring search bar attempts to hide soft KB but fails
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-06-21T10:42:15.000+0000 |
Affected Version/s | Release 1.7.5, Release 1.8.0.1 |
Fix Version/s | Release 3.1.0, 2012 Sprint 24, 2012 Sprint 24 API |
Components | Android |
Labels | api, kitchensink, qe-testadded |
Reporter | Eric Merriman |
Assignee | Hieu Pham |
Created | 2011-11-29T17:11:49.000+0000 |
Updated | 2013-06-21T10:42:15.000+0000 |
Description
Description:
In KitchenSink, in Controls>Search bar, blurring the search bar should dismiss the soft kb if it's onscreen but does not. A visible movement of the KB is perceived as it starts to dismiss, but does not actually complete the process. It remains on screen.
The workaround is to hide the field and then attempt to blur. THe KB will be removed from the screen.
Steps to reproduce:
1) Install KS with 1.8.0.1
2) Navigate to Controls>Search bar
3) Click on the search to bring up the soft KB
4) Click the cancel button or click the "blur search bar"
Result:
KB moves slightly as if it will move offscreen, but the KB remains on screen
Expected:
KB is removed from the screen
Note:
Also Occurs With 1.7.5 GA
The same behavior occurs with the KS test: Controls>text area>Basic
Also occurs with Controls>Test Field>Events with SDK 1.8.0.1.v20111214093905 on Both Xoom and LG Slate
This also means that there seems to be no way to use the built-in cancel button on the search bar. It doesn't generate a 'blur' event, so there's no way to know when it's been pressed in order to use Eric's workaround. In the following test case, note that: 1) No matter what I do, the 'blur' event is not generated. 2) Clicking the "Cancel" button does not clear the search field, blur the search field, or close the onscreen keyboard. 3) The Back button will close the onscreen keyboard, but there doesn't seem to be any way to clear the text in the search bar short of erasing it one character at a time.
Correction to the above: blur seems to be fired in the emulator if: 1) I use the back button to close the keyboard, AND 2) I scroll down with the mouse scrollwheel. However, just clicking on a row outside of the search box doesn't blur the search box.
Update: looking into the Kitchen Sink issues, I think they're not the same issue. I think what we have in the Kitchen Sink is a sample issue, caused by the fact that there is no other focusable control on screen, so as soon as the search bar is blurred, it gets focus again by default. I opened a new bug for the issues I reported above: TIMOB-7748.
master PR: https://github.com/appcelerator/titanium_mobile/pull/3515
Tested with: SDK:3.1.0.v20130228145653 Studio: 3.1.0.201302252142 Device: Samsung tab(v 3.2) works as expected.
Reopening to update labels