Writing a Phonegap (3.4) app for Android (Galaxy S4 4.3). App has: Background (zIndex = 0) Layer (zIndex = 1)
The background never changes. The Layer is scrollable with touch or onmousedown, because it shows images from another shadow canvas (which is bigger than the screen in height).
The code that 'refreshes' the Layer canvas (contextInChat), cause the user is scrolling:
contextInChat.clearRect(0, 0, canvasInChat.width, canvasInChat.height);
contextInChat.drawImage(canvasNewChat, 0, chats.getCurrentChat().getYPosition(), windowWidth, chat_screen_height, 0, 0, canvasInChat.width, canvasInChat.height);
This works OK in my PC browser using Firefox (A movable rect):
But when testing on the device, it does scroll BUT the problem is that it doesn't clear how the Layer was before starting to move it (Moving it upwards, the bottom rect was there before starting to move, but the upper rect is being moved "ok", the bottom rect should have been cleared with the clearRect() above):