ionic-team / ionic-v1

The repo for Ionic 1.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
193 stars 187 forks source link

Mailto links cause keyboard to incorrectly appear 'open' to the app #169

Open jgw96 opened 7 years ago

jgw96 commented 7 years ago

From @jacquesdev on March 2, 2016 18:20

Short description of the problem:

I have an app that

I need to hide the button when the keyboard is active, which checks the body.keyboard-open style that ionic adds based on the keyboard's state.

The problem comes in when I click on one of the mailto links, where it then adds the class of keyboard-open to the body. Once I close the email client, it does not remove this style.

So what happens is basically if I click a mailto link and close out the message, the button is missing, until I specifically click in an input element again, and then out again.

The Android version seems to be ok

Ionic Version: 1.2.4

Browser & Operating System: iOS (only on the mobile device)

Run ionic info from terminal/cmd prompt:

Your system information:

Cordova CLI: 5.4.1
Gulp version:  CLI version 3.8.11
Gulp local:   Local version 3.9.1
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: 1.8.5 
ios-sim version: 3.1.1 
OS: Mac OS X El Capitan
Node Version: v4.2.4
Xcode version: Xcode 7.2.1 Build version 7C1002 

Copied from original issue: driftyco/ionic#5688

jgw96 commented 7 years ago

From @jacquesdev on March 10, 2016 18:32

Thank you!

On 10 Mar 2016, at 18:16, Kristoffer K notifications@github.com wrote:

This is a problem!.. I got the same issue

Workaround: angular.element( document.getElementsByClassName("bar-footer")).removeClass( "hide-on-keyboard-open" );

This removes the class on "bar-footer" when executed. Put it inside a function and call this before you call the mailto...

— Reply to this email directly or view it on GitHub https://github.com/driftyco/ionic/issues/5688#issuecomment-194984083.

jgw96 commented 7 years ago

Thanks for submitting this issue, and im glad you were able to get some help! Since it looks like this issue was fixed for you i will be closing this issue.

jgw96 commented 7 years ago

From @stoffern on March 14, 2016 7:49

This is actually a issue in Ionic. Opening all "mailto" links in a iPhone will result in Ionic setting keyboard open. When returning to the app the keyboard keeps showing open. Clicks inside the app will not trigger "keyboard close"