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

[UIWebView] Wrong input takes value when moving from one <input> to another <input> (each <input> in <iframe>) #14385

Closed
sriduth opened this issue Apr 25, 2018 · 3 comments
Labels
ionitron: v3 moves the issue to the ionic-v3 repository

Comments

@sriduth
Copy link

sriduth commented Apr 25, 2018

Ionic version: (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[ x ] 3.x
[ ] 4.x

I'm submitting a ... (check one with "x")
[ x ] bug report
[ ] feature request

Current behavior:
Moving from input 1 (inside iframe1) to input2 (inside iframe2) when autocorrect is triggered on input1 causes the user input(meant for input2) to be appended inside input1.

Expected behavior:
User input is sent to currently focussed input.

Steps to reproduce:

  • Create base ionic app (ionic start)
  • Replace home.html with snippet.
  • Host the safari2.html snippet in and set the src of iframes in home.html to point to the hosted page.
  • Ensure that CordovaWebViewEngine is set to UIWebViewEngine in config.xml
  • Ensure in app.html that the iframe can be loaded (set allow-navigation and origin appropriately)
  • In the app, type something in the first input wait for autocorrect to suggest something.
  • Move to another input and type.

Related code:

home.html
<ion-header>
  <ion-navbar>
    <ion-title>
      Ionic Blank
    </ion-title>
  </ion-navbar>
</ion-header>

<ion-content padding>
    <form>
        <iframe src="http://192.168.39.73:8001/safari2.html"></iframe>
	<iframe src="http://192.168.39.73:8001/safari2.html"></iframe>
    </form>
</ion-content>
safari2 (to be hosted and used in home.html)
<html>
    <head></head>
    <body>
        <input  type="text" />
    </body>
</html>

Other information:

I think this might be related to ionic's handling of taps as removing all JS libraries in index.html does not reproduce this issue with the same case.

GIF: https://user-images.githubusercontent.com/4116675/39105599-7a58562c-46d4-11e8-8ab8-7d2fee3d1bc0.gif

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

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 7.0.1

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : ios 4.4.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    ios-deploy        : 1.9.0
    Node              : v9.5.0
    npm               : 5.6.0
    OS                : macOS High Sierra
    Xcode             : Xcode 9.2 Build version 9C40b

Environment Variables:

    ANDROID_HOME : /Users/sriduth.jayhari/Library/Android/sdk

Misc:

@ionitron-bot ionitron-bot bot added the triage label Apr 25, 2018
@sriduth
Copy link
Author

sriduth commented Apr 25, 2018

ionic-team/ionic-v1#380

Issue was initially reported in ionic v1. For a temporary fix we set autocorrect="off" on the input inside the <iframe>.

@Ionitron Ionitron added the ionitron: v3 moves the issue to the ionic-v3 repository label Nov 29, 2018
@ionitron-bot
Copy link

ionitron-bot bot commented Nov 29, 2018

This issue has been automatically identified as an Ionic 3 issue. We recently moved Ionic 3 to its own repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there.

If I've made a mistake, and if this issue is still relevant to Ionic 4, please let the Ionic Framework team know!

Thank you for using Ionic!

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 29, 2018

Issue moved to: ionic-team/ionic-v3#618

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ionitron: v3 moves the issue to the ionic-v3 repository
Projects
None yet
Development

No branches or pull requests

2 participants