question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Multiple Floating Label Inputs are Very Buggy

See original GitHub issue

Short description of the problem:

On an ios device with a long form that makes ion-content long enough to scroll. Focus on a input with floating labels and the input bounces. This does not occur while testing the app in chrome or safari browsers.

z7qsxk8eum

Also experiencing weird behavior while scrolling and focused in an input.

bvgfdn6r1m

What behavior are you expecting?

Normal floating label behavior after the interface has scrolled to the focused input. I think the css transform while scrolling is causing issues.

Steps to reproduce:

  1. Add 10 items to a list with a floating label.
  2. Focus on the elements one after the other from top to bottom.
  3. Run in ios emulator or on ios device.
<ion-header>
  <ion-navbar>
    <ion-title>Title</ion-title>
  </ion-navbar>
</ion-header>

<ion-content>
  <ion-list>

    <ion-item>
      <ion-label floating>Label</ion-label>
      <ion-input type="text"></ion-input>
    </ion-item>

    <ion-item>
      <ion-label floating>Label</ion-label>
      <ion-input type="password"></ion-input>
    </ion-item>
    <ion-item>
      <ion-label floating>Label</ion-label>
      <ion-input type="text"></ion-input>
    </ion-item>

    <ion-item>
      <ion-label floating>Label</ion-label>
      <ion-input type="password"></ion-input>
    </ion-item>
    <ion-item>
      <ion-label floating>Label</ion-label>
      <ion-input type="text"></ion-input>
    </ion-item>

    <ion-item>
      <ion-label floating>Label</ion-label>
      <ion-input type="password"></ion-input>
    </ion-item>
    <ion-item>
      <ion-label floating>Label</ion-label>
      <ion-input type="text"></ion-input>
    </ion-item>

    <ion-item>
      <ion-label floating>Label</ion-label>
      <ion-input type="password"></ion-input>
    </ion-item>
    <ion-item>
      <ion-label floating>Label</ion-label>
      <ion-input type="text"></ion-input>
    </ion-item>

    <ion-item>
      <ion-label floating>Label</ion-label>
      <ion-input type="password"></ion-input>
    </ion-item>
    <ion-item>
      <ion-label floating>Label</ion-label>
      <ion-input type="text"></ion-input>
    </ion-item>

    <ion-item>
      <ion-label floating>Label</ion-label>
      <ion-input type="password"></ion-input>
    </ion-item>
    <ion-item>
      <ion-label floating>Label</ion-label>
      <ion-input type="text"></ion-input>
    </ion-item>

    <ion-item>
      <ion-label floating>Label</ion-label>
      <ion-input type="password"></ion-input>
    </ion-item>

  </ion-list>
</ion-content>

Which Ionic Version? 1.x or 2.x 2.X

Run ionic info from terminal/cmd prompt: (paste output below)

Cordova CLI: 6.1.1
Gulp version:  CLI version 1.2.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
ios-deploy version: 1.8.5
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.1.0
Xcode version: Xcode 7.3.1 Build version 7D1014

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
brunoosilvacommented, Oct 6, 2016

This works for me:

.input-cover { position: static!important; }

1reaction
sarahtullycommented, Oct 18, 2016

+1, @brunoosilva temporary fix resolved the issue for me. Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: Multiple Floating Label Inputs are Very Buggy · Issue #7318
On an ios device with a long form that makes ion-content long enough to scroll. Focus on a input with floating labels and...
Read more >
Developers - bug: Multiple Floating Label Inputs are Very Buggy -
On an ios device with a long form that makes ion-content long enough to scroll. Focus on a input with floating labels and...
Read more >
Ionic input with floating label buggy problem!
I have a problem. I am struggling to implement floating label with ion input component. But every time I test on google chrome...
Read more >
Float labels are problematic - Adam Silver
Float labels were designed to address the problem with using placeholder labels – that the label disappears as soon as the user starts...
Read more >
How to add 2nd floating label to input when using 1 div only in ...
Each input + label combo needs to be within its own .form-floating class. Having multiple inputs in the same div was causing that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found