made hideKeyboard more robust

Robustified hideKeyboard code.  Works with existing tests but will be adding new functional tests for swipe fallback.
sounds like @bootstraponline has the best handle on the appropriate behavior, so let's go with his suggestion