Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
398 views
in Technique[技术] by (71.8m points)

jquery - Android 4.3 and PhoneGap, cant tap link

I am using PhoneGap 2.9 on Galaxy Note 3. I have a layout similar to Facebook mobile's. It has a nav bar that slides out from the left. The issue I am having is that when the the buttons for the nav bar exceed the size of the screen and need to scroll, they are unable to be tapped. That is, they do not perform their expected functions, and the tap/click event does not fire. The nav bar still responds to swiping, and scrolls properly though.

Its almost as if the parent element of the buttons, an HTML nav element, is receiving the touch events, but some sort of imaginary wall is keeping the child elements from being tapped. Any pointers would be appreciated.

edit: In eclipse I noticed that i have been getting some output that I did not get with 4.2.1, or Android 4.2.2

WebViewInputDispatcher blockWebkitDraw
WebViewInputDispatcher blockWebkitDraw lockedfalse
webview                blockWebkitViewMessage = false

edit: I have noticed that the very top button on my navbar is tappable, but only on its upper edge/border area.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Turns out this was easily solved by the old CSS transform trick that seems to cure all of Androids webview ills. I just added this css class to the scrolling navbar:

.androidpaintfix {
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0, 0, 0);
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...