Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ion-searchbar's clear button makes keyboard dismissal fail on iOS #7527

Closed
KevinKelchen opened this issue Aug 2, 2016 · 0 comments
Closed
Assignees

Comments

@KevinKelchen
Copy link

KevinKelchen commented Aug 2, 2016

Short description of the problem:

In iOS only, with the ion-searchbar component, using the clear button can result in the keyboard not dismissing correctly. By entering text, tapping the clear button, and trying to dismiss the keyboard, the keyboard does not hide but remains open.

What behavior are you expecting?

Expected the keyboard to dismiss properly on the first attempt to dismiss it.

Steps to reproduce:

(Note: Run these steps on an iOS device. Use with the provided Plunker example.)

  1. Create an ion-searchbar.
  2. Enter text in the ion-searchbar input field.
  3. Tap the clear button in a precise manner to avoid tapping the surrounding area. (Sometimes the issue doesn't seem to occur if you "fat-finger" the clear button.)
  4. Tap the Done button on the accessory bar of the iOS keyboard.
  5. You should see that the keyboard begins to dismiss but immediately expands open again. A second tap of the Done button will then work as expected.
<ion-content>
   <ion-searchbar></ion-searchbar>
</ion-content>

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

To give some background from our particular use case (if that's interesting), we were forward navigating to a new screen that features the ion-searchbar and an ion-list that displays filtered search results.

In one case after tapping the clear button, the first time we subsequently tap on an item in the ion-list to select it the keyboard's predictive word suggestion bar would flicker, the keyboard would remain open, and the list item selection would not be successful (a second tap would select the item as expected).

In a second scenario after tapping the clear button, if we then tapped the Back button to go the previous page we would be left in a hanging transition state where we could see both pages for a few seconds before the transition completed successfully. In this hanging transition state we noticed that in the console it seemed that node_modules/ionic-angular/util/keyboard.js logged the following:

keyboard close()
keyboard onClose
keyboard isOpen - true (Edtior's Note: 102 times!)
keyboard closed

The keyboard isOpen - true is logged repeatedly until the transition completes and keyboard closed is logged.

The Plunker example does not have this advanced UI, but you can observe what is likely the same issue by trying to dismiss the keyboard with the iOS keyboard's Done button.

Which Ionic Version?

2.0.0-beta11

Plunker that shows an example of your issue

Open this Plunker in a browser on iOS. Open the embedded view and close the code pane for more screen realestate:
http://plnkr.co/edit/Lm8OSQMHwseWCTOJzqTR?p=preview

Run ionic info from terminal/cmd prompt: (paste output below)

Your system information:

Cordova CLI: 6.2.0
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
ios-deploy version: 1.8.6
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v5.10.1
Xcode version: Xcode 7.3.1 Build version 7D1014


Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:

Install ios-sim to deploy iOS applications.npm install -g ios-sim (may require sudo)


Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants