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

bug: Clicking ionicActionSheet clicks textarea behind it #2204

Closed
JonathanAquino opened this issue Sep 13, 2014 · 7 comments
Closed

bug: Clicking ionicActionSheet clicks textarea behind it #2204

JonathanAquino opened this issue Sep 13, 2014 · 7 comments
Assignees
Milestone

Comments

@JonathanAquino
Copy link

Type: bug

Platform: ios 7 webview

If you click the $ionicActionSheet and a textarea is behind where you clicked, the keyboard appears and the textarea doesn't have focus.

To repro:

  1. Create a blank Ionic starter project.
  2. In index.html, make the body the following:
<ion-pane>
  <ion-header-bar class="bar-stable">
    <h1 class="title">Hello World</h1>
  </ion-header-bar>
  <ion-content>
    <p ng-controller="MyCtrl">Click <a href="#" ng-click="showActionSheet()">this</a> to show an action sheet.</p>
    <textarea style="height: 1000px; background-color: pink">This pink area is a textarea that covers the screen.</textarea>
  </ion-content>
  <ion-footer-bar></ion-footer-bar>
</ion-pane>
<script>
  angular.module('starter')
  .controller('MyCtrl', function ($scope, $ionicActionSheet) {
    $scope.showActionSheet = function () {
      $ionicActionSheet.show({
        buttons: [{text: "A"}, {text: "B"}, {text: "C"}],
        buttonClicked: function () { return true; },
        cancelText: 'Cancel'});
    };
  });
</script>
  1. Click the link to show an action sheet.
  2. Click the Cancel button in a spot that is on the footer (i.e., not on the textarea). The action sheet disappears and no keyboard appears, as expected.
  3. Click the link to show the action sheet.
  4. Click the A button, or any button on a spot that is not on the footer (i.e., on the textarea).

// Expected: The keyboard does not appear.
// Actual: The keyboard appears, and the textarea does not have focus.

@JonathanAquino JonathanAquino changed the title bug: Clicking ionicActionSheet clicks textarea behindit bug: Clicking ionicActionSheet clicks textarea behind it Sep 13, 2014
@JonathanAquino
Copy link
Author

My workaround for this is to disable the textarea then re-enable it 100ms after the action sheet closes. Would be nice to get a proper fix for this though.

@JonathanAquino
Copy link
Author

This bug can really break the UI. The keyboard hangs around even when you leave the current view. You can get into situations like a modal dialog whose buttons are being blocked by the keyboard, and there's nothing you can do.

@JonathanAquino
Copy link
Author

This problem also seems to happen with $ionicPopup.

@adamdbradley adamdbradley added this to the 1.0.0-rc0 milestone Sep 15, 2014
@adamdbradley adamdbradley self-assigned this Sep 15, 2014
@adamdbradley
Copy link
Contributor

Thanks for the example! Should be fixed now.

@JonathanAquino
Copy link
Author

Sweet - thanks!

@rafaelfamorim
Copy link

I'm facing this issue, but in a very specific scenario, it only happens when I tap it the very FIRST time and only in iOS. To simulate that, I need to reinstall the app or reboot the iphone.

Do you guys have some thoughts about what I could try to fix it?

I've been played around with it for a while, but didn't find anything.

Thanks in advance!

@mariamayer
Copy link

Same issue here, it only happens when I tap it the very FIRST time and only in iOS.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
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

4 participants