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

Keyboard overlays popover when using forms #11325

Closed
yannbf opened this issue Apr 22, 2017 · 3 comments · Fixed by #11586
Closed

Keyboard overlays popover when using forms #11325

yannbf opened this issue Apr 22, 2017 · 3 comments · Fixed by #11586

Comments

@yannbf
Copy link
Contributor

yannbf commented Apr 22, 2017

Ionic version: (check one with "x")
[ ] 1.x
[ ] 2.x
[x] 3.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
So I need to add a small form inside a popover. It's a "add to wishlist" popover. So the user either selects an existing wishlist or creates a new wishlist and add the item at the same time. When I tried that in the device, I got a weird result where the keyboard was overlaying the popover and the form couldn't be seen.

Image: http://imgur.com/a/payjQ

Expected behavior:
I'm not sure if that is somewhat achievable, but it would be nice if there was a scroll, just like in a normal page with input forms.

Steps to reproduce:
Create the popover component and try it out on a device

Related code:

.html

<ion-content>
	<ion-list>
		<ion-list-header>Wishlists</ion-list-header>
		<button ion-item *ngFor="let wishlist of wishlists" (click)="addToWishList(wishlist.id)">{{wishlist.name}}</button>
	</ion-list>
	<div *ngIf="!showInput">
		<button ion-item detail-none (click)="create()" class="pink add-button">Create <ion-icon name="add" class="right"></ion-icon></button>
	</div>
	<div *ngIf="showInput">
		<ion-item>
			<ion-input placeholder="Name.." [(ngModel)]="wishlistName" maxlength="25"></ion-input>
		</ion-item>
		<button ion-button clear (click)="createNewWishlist()" class="right">Add</button>
	</div>
</ion-content>

.ts

import { ViewController } from 'ionic-angular';
import { Component } from '@angular/core';
@Component({
  selector: 'wishlists-popover',
  templateUrl: 'wishlists-popover.html',
})
export class WishlistsPopover {
  showInput = false;
  wishlistName = "";
  wishlists = [
    {
      id: 1,
      name: "Dream's adventure"
    },
    {
      id: 2,
      name: "Weekend",
    },
    {
      id: 3,
      name: "Family Time"
    },
  ];

  constructor(public viewCtrl: ViewController) { }

  create() {
    this.showInput = true;
  }
  createNewWishlist() {
    this.wishlists.push({ id: 5, name: this.wishlistName });
    this.showInput = false;
    this.wishlistName = "";
  }

  addToWishList(id) {
    console.log("added to " + id);
  }

  close() {
    this.viewCtrl.dismiss();
  }
}
Cordova CLI: 6.3.1
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v6.9.1
Xcode version: Not installed
@jgw96
Copy link
Contributor

jgw96 commented Apr 24, 2017

Hello, thanks for opening an issue with us! Any reason you're using a popover for this instead of a modal or select?

@yannbf
Copy link
Contributor Author

yannbf commented Apr 24, 2017

Hey Justin, Yes, the main reason is the feature was requested by the client.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 2, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

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

Successfully merging a pull request may close this issue.

2 participants