Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

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

Open
ionitron-bot bot opened this issue Nov 29, 2018 · 0 comments
Labels

Comments

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 29, 2018

Original issue by @sriduth on 2018-04-25T06:57:47Z

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:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

0 participants