Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#15396 closed defect (fixed)

dojox.mobile.ScrollableView keyboard issue on Android

Reported by: Eric Wang Owned by: Eric Durocher
Priority: undecided Milestone: 1.8
Component: DojoX Mobile Version: 1.7.2
Keywords: todoapp Cc: ykami
Blocked By: Blocking:

Description (last modified by cjolif)

On Android, when keyboard popup and directly transition to another view, the ScrollableView layout will failed. dojox.mobile.View works well. The layout failed including:

  1. ScrollableView height calculate wrong
  2. slide up/down cannot to the top or bottom
  3. fixed header/footer disappear
  4. when used in dojox.app, the transition failed (see todoApp)

See the attachment and the test case file. (put the test file in dojox/mobile/tests folder)

Attachments (2)

ScrollableView issue.zip (225.4 KB) - added by Eric Wang 8 years ago.
15396.patch (873 bytes) - added by Eric Durocher 8 years ago.
Detect virtual keyboard show/hide on Android and update layout - Eric Durocher (IBM, CCLA)

Download all attachments as: .zip

Change History (12)

Changed 8 years ago by Eric Wang

Attachment: ScrollableView issue.zip added

comment:1 Changed 8 years ago by cjolif

Keywords: todoapp added

comment:2 Changed 8 years ago by cjolif

Description: modified (diff)

comment:3 Changed 8 years ago by cjolif

#15395 is a duplicate of this ticket.

comment:4 Changed 8 years ago by cjolif

4th point might be the same as #15386

comment:5 Changed 8 years ago by Eric Durocher

Yes I see what causes the first 3 points, but the 4th seems different. EricWang?, can you explain how to reproduce the 4th point in the todoApp please? Which version, exact steps, etc. Thanks!

Version 0, edited 8 years ago by Eric Durocher (next)

Changed 8 years ago by Eric Durocher

Attachment: 15396.patch added

Detect virtual keyboard show/hide on Android and update layout - Eric Durocher (IBM, CCLA)

comment:6 Changed 8 years ago by Eric Durocher

Cc: ykami added

Attaching a patch that seems to fix the first 3 points. The idea is to watch resize events caused by keyboard showing/hiding (we use a heuristic to detect this: width not changing + height changing by more than 100px, seems to work OK on all tested devices). EricWang if you can check that it works for you, thanks.

comment:7 Changed 8 years ago by ykami

edurocher, it looks like you came up with a safer, less side-effect solution, though I'm not sure if the detection logic is always reliable. One concern is that some of the devices fire excessive number of onresize events, which could affect the performance. Anyway, that looks much better than simply changing onorientationchange to onresize. Good work. :)

comment:8 Changed 8 years ago by Eric Durocher

Thanks for the feedback, the detection seems reliable on all tested Android devices. As for performance, in most cases the resize handler will just fetch the screen size (innerWidth/Height usually) and compare with the previous size, this should be really quick.

comment:9 Changed 7 years ago by Eric Durocher

Milestone: tbd1.8
Resolution: fixed
Status: newclosed

comment:10 Changed 7 years ago by Eric Durocher

Patch committed by cjolif: [28794]

Note: See TracTickets for help on using tickets.