Search code examples
ios5mobileinputsafarizepto

can't copy the input field value inside iframe on iOS5


I can't copy input field value.

I tried this steps.

  1. focus input field
  2. hold and tap select all
  3. tap copy

fiddle1 can copy text. (not load Zepto.js)

fiddle2 can't copy text. (load Zepto.js)

I think the reason lies with Zepto.

Do you know anything about that?


Solution

  • well, I'm not sure if I understand your problem or your attempted solution since you didn't post any code, but with Zepto (or jQuery) you get input values like so:

    var userInput = $('#input_id').val()
    // then you can do whatever with it, like writing it to an alert
    alert(userInput)