0

I'm noob with Dart and Polymer, I want to develop a web app for mobile devices. My problems is that input fields at the bottom of the page are hidden by the virtual keyboard, and you can't see what you are writing.

I have seen some solutions for other "frameworks", but nothing related with Dart or Polymer, maybe there is a shorthand that I don't know...

I've thought to create a large empty tag in the bottom of the page and to make it visible, when focus is over the input, but I think it's a bit sloppy....

thanks in Advance

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567

1 Answers1

0

Maybe scrollIntoView() is what you are looking for.
I guess you need to get notified about the opening of the virtual keyboard to know when you need to scroll. Here are some ideas how to achieve that iPad Web App: Detect Virtual Keyboard Using JavaScript in Safari?

Community
  • 1
  • 1
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
  • Hi, scrollIntoView() works great, and it has onlyScrollIfneeded by default. But the problem goes on, because my page fits the screen and it doesn't have a scroll to scroll into. I found tricks to detect if virtualkeyboards pops difficult to implement, and I still find that insert a big White div to force scroll to appear is a bit sloppy..... – Javier Esteban Jul 27 '15 at 10:56
  • Glad to hear :) If this answer solves your problem please mark the question as answered by clicking on the white check mark left to the answer (below the up/down-vote buttons) – Günter Zöchbauer Jul 27 '15 at 11:00
  • I see. I guess I won't be able to provide a better answer. If it doesn't solve your problem then it's of course better for the question to stay unanswered so other might make an attempt. – Günter Zöchbauer Jul 27 '15 at 11:03