Skip to content

two or more ion-input inside ion-item get wrong focus #9955

@violabg

Description

@violabg

Ionic version: (check one with "x")
[ ] 1.x
[x ] 2.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:

it happens on iOS devices or Simulator
it works in browsers
didn't test on Android

if I use more then one 'ion-input' inside a 'ion-item', it dosen't matter which one I click, the focus always get on the last one.
So if I want to edit the first one I have to click it twice.

Expected behavior:

The input clicked get the focus and keyboard.

Steps to reproduce:

Related code:

<ion-list>
		<ion-item>
			<ion-input type="text" value="hi"></ion-input>
			<ion-input type="number" value="44"></ion-input>
		</ion-item>

		<ion-item>
			<ion-label floating>Floating Label</ion-label>
			<ion-input type="text" value="hi"></ion-input>
			<ion-input type="number" value="44"></ion-input>
		</ion-item>

		<ion-item>
			<ion-label fixed>Fixed Label</ion-label>
			<ion-input type="text" value="hi"></ion-input>
			<ion-input type="number" value="44"></ion-input>
		</ion-item>
	</ion-list>

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

insert the output from ionic info here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions