Device rotation impacts on the visualization of the search bar. The bar disappears if there is text in it and device is rotated, or if the search button on the virtual keyboard is pressed.
Use this code:
There are two ways to replicate:
1) focus the bar, write something, then rotate the screen
2) focus the bar, write something and press return in the virtual keyboard
Not sure if this can be considered related: the CANCEL button also stops working when the device is rotated. With the same code, focus the bar and rotate the screen: the CANCEL button stops working.
The feature only come back when the app is restarted (e.g. rotating the device back does not help).