mobify / pinny

A mobile-first content fly-in UI plugin
MIT License
23 stars 4 forks source link

Pinny gets distorted when the soft keyboard is shown after orientation #63

Closed wizardlyhel closed 9 years ago

wizardlyhel commented 9 years ago

Steps to reproduce:

  1. Open pinny
  2. Focus on an input so that soft keyboard pops up
  3. Change orientation

Result: You will have a pinny that is shifted and it will revert itself after soft keyboard is dismissed

This is happening on iOS 7.x

pinny

wizardlyhel commented 9 years ago

Investigated by @hcstephencheung

I've investigated into this issue a little bit, and here's a summary of what I found so far (and questions after that).

Situation:

References:

Solution Explanation:

Questions:

kpeatt commented 9 years ago

What if we just blur the input on orientation change?

wizardlyhel commented 9 years ago

We can definitely do that but is this something we want to integrate into Pinny? Or just leave it as an workaround and be implemented when issue arises?

kpeatt commented 9 years ago

I think it could be integrated into Pinny — this is a fault with our Pinny implementation and it's a good fix for it.

wizardlyhel commented 9 years ago

@scalvert If you are okay with it, I can have @hcstephencheung to implement this.

scalvert commented 9 years ago

To be clear, we're proposing fixing this by blurring on orientation change, correct?

wizardlyhel commented 9 years ago

Yes, blurring inputs on orientation change

scalvert commented 9 years ago

Make it so

scalvert commented 9 years ago

http://mir.aculo.us/2009/01/11/little-javascript-hints-episode-3-force-redraw/

kpeatt commented 9 years ago

I didn't think this was a redraw issue but instead was a problem with how iOS updates its position properties.