0

I'm developing a mobile app supporting portrait mode only, looking for a cross browser way of detecting if window resize was caused by keypad appearance/disappearance as I need to apply a custom action for those events.

Best I can think of is capture window height during the initial load and then check if it's been changed.

Him1
  • 1
  • 1
  • please check here https://stackoverflow.com/questions/28272274/how-to-detect-keyboard-show-hide-event-in-jquery-for-mobile-web-application – manny Sep 25 '17 at 10:35
  • thanks, makes sense, I don't use jQ otherwise I'm in agreement with the approach:) – Him1 Sep 25 '17 at 10:59
  • @Him1 Is it like you have to do something when keyboard is shown up/hidden? – Piyush Sep 25 '17 at 11:15
  • @Piyush keypad over-stretches the layout, I've to show a scrollbar. – Him1 Sep 25 '17 at 12:30
  • @Him1 If that is the case refresh the layout on window resize event. That will make your layout reset everytime(not only on keypad) when it is resized. This should also handle changes in the portrait and landscape modes in mobile. – Piyush Sep 25 '17 at 13:32

0 Answers0