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: Using ng-switch directive with ion-label is not firing the focus event on a input field. #4778

Closed
ghost opened this issue Dec 14, 2015 · 1 comment
Milestone

Comments

@ghost
Copy link

ghost commented Dec 14, 2015

Type: bug

Platform: mobile browser

Basically, the problem is that the input field is not receiving the focus when we click on a <ion-label> or <span class="input-label">. That's my code:

<ion-input class="item item-input" ng-switch="platform">
    <ion-label>User</ion-label>
    <input ng-switch-when="android" type="tel" name="user" />
    <input ng-switch-default type="text" name="user" />
</ion-input>

If i remove the ng-switch directive and let only one input field, the focus event works normally after clicking the label.

@ghost ghost changed the title Using ng-switch directive with ion-label is not firing the focus event on a input field. bug: Using ng-switch directive with ion-label is not firing the focus event on a input field. Dec 14, 2015
@ghost
Copy link
Author

ghost commented Dec 14, 2015

I think the problem is related to <ion-input> directive, cause it's working when i use Labels. The code above works:

<label class="item item-input" ng-switch="platform">
    <ion-label>User</ion-label>

    <!--- this also works --->
    <!-- <span class="input-label">User</span> -->

    <input ng-switch-when="android" type="tel" name="user" />
    <input ng-switch-default type="text" name="user" />
</label>

@mlynch mlynch added this to the 1.2.1 milestone Dec 14, 2015
@mlynch mlynch closed this as completed in ebe134b Dec 15, 2015
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 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

1 participant