Click and touch events do not fire after using scroll CSS

1,366 views
Skip to first unread message

Will Quast

unread,
Nov 23, 2011, 6:59:26 PM11/23/11
to phonegap
I think I have run into a bug in the new CSS scrolling introduced in
iOS 5.
After using "-webkit-overflow-scrolling: touch", then clear out and
replace the html, there is a "dead zone" at the top of the screen.
I have created a single file demo of this bug. I would be great if
someone that knows about the internals of webview could take a look at
it and see what is wrong, or at least tell me im not crazy.

The index file is located at http://pastebin.com/JwL412fy
Just start a new PhoneGap 1.2 project and drop this in as the
index.html file.


David Lewis

unread,
Nov 30, 2011, 4:53:50 PM11/30/11
to phonegap
Hi Will,

I'm working on a PhoneGap project and finding a similar problem to
you, dead zones on the page after using CSS for scrolling.

To help solve my problem, I've been working with your code as it's a
neat way to trigger the issue. One thing I've found is that removing
all the calls to console.log seems to improve the reliability of the
touch events.

In my test I found that any call to console.log that is triggered from
the callback associated with deviceready will make the touch events
unreliable (this includes functions that are called from within this
callback).

This seems completely insane, so I'd love to know if you have success
in doing this.

Fingers crossed,
David


On Nov 24, 10:59 am, Will Quast <w...@bohemian.cc> wrote:
> I think I have run into a bug in the new CSS scrolling introduced in
> iOS 5.
> After using "-webkit-overflow-scrolling: touch", then clear out and
> replace the html, there is a "dead zone" at the top of the screen.
> I have created a single file demo of this bug.  I would be great if
> someone that knows about the internals of webview could take a look at
> it and see what is wrong, or at least tell me im not crazy.
>

> The index file is located athttp://pastebin.com/JwL412fy

Alex Grande

unread,
Jan 16, 2012, 2:22:08 PM1/16/12
to phonegap
I believe the reason for console.log contributing to the problem is
that it is call native apis through phonegap. I have found that every
time I make a call to phonegap, use -webkit-overflow-scrolling, and
use css3 animations, the problem occurs.

On Nov 30 2011, 1:53 pm, David Lewis <m...@david-lewis.com> wrote:
> Hi Will,
>
> I'm working on a PhoneGap project and finding a similar problem to
> you, dead zones on the page after using CSS forscrolling.
>
> To help solve my problem, I've been working with your code as it's a
> neat way to trigger the issue. One thing I've found is that removing
> all the calls to console.log seems to improve the reliability of the
> touch events.
>
> In my test I found that any call to console.log that is triggered from
> the callback associated with deviceready will make the touch events
> unreliable (this includes functions that are called from within this
> callback).
>
> This seems completely insane, so I'd love to know if you have success
> in doing this.
>
> Fingers crossed,
> David
>
> On Nov 24, 10:59 am, Will Quast <w...@bohemian.cc> wrote:
>
>
>
>
>
>
>
> > I think I have run into a bug in the new CSSscrollingintroduced in

relluf

unread,
Feb 7, 2012, 4:05:50 AM2/7/12
to phonegap
On Jan 16, 8:22 pm, Alex Grande <a...@alexgrande.com> wrote:
> I believe the reason for console.log contributing to the problem is
> that it is call native apis through phonegap. I have found that every
> time I make a call to phonegap, use -webkit-overflow-scrolling, and
> use css3 animations, the problem occurs.

Yes, I can confirm this. Although at first I also suspected that the
use of CSS transitions causes dead zones, I am pretty sure they don't.
The use of -webkit-overflow-scrolling *and* the use of PhoneGap.exec
(callback to native code) seems to be enough to cause dead zones.

This issue (or at least its manifestation in my project) has been
driving me mad for the last 2 weeks. I am glad that I have finally
found some "partners in crime". :-)

Ralph

Kerri Shotts

unread,
Feb 7, 2012, 11:35:31 PM2/7/12
to phon...@googlegroups.com
Doesn't solve the real issue, but you might go for iScroll instead if you have to get something out. Of course, it has its own share of problems, but doesn't have this particular issue.

I tried the overflow-scrolling in my app as well and found that it didn't work as needed. Too many things went entirely wonky. Switched back to iScroll.

Generesque

unread,
Mar 22, 2012, 7:49:31 PM3/22/12
to phon...@googlegroups.com
Has anyone made any progress on this issue? I've been banging my head against the wall trying to figure it out for the last several days, and I've come to similar conclusions as the rest of you. The issue is definitely caused by adding and removing elements with -webkit-overflow-scrolling: touch to and from the DOM. Other things seem to affect it, like calls to Cordova.exec and window.console.log, but the only constant is overflow scrolling.

Any additional info would be greatly appreciated.

Ralph Kazemier

unread,
Apr 1, 2012, 7:27:50 AM4/1/12
to phon...@googlegroups.com
I am now using version 1.5.0 (Cordova) and "disabled the internal
PhoneGap frame" as suggested by TimW:
http://groups.google.com/group/phonegap/msg/7beee231774af8c9

I can report that my app is working just fine now. Plugins/callbacks
to native code are working correctly. I am not quite sure (yet) what
the side effects of "disabling the internal PhoneGap frame" might be,
just wanted to post here ASAP.

Ralph

> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com

kate

unread,
Apr 19, 2012, 1:47:21 PM4/19/12
to phon...@googlegroups.com
Disabling the phonegap iframe makes several plugins unusable - like google analytics and facebook integration.

Has anyone else found another workaround for this issue or perhaps any hints on where the error might lie within phonegap?

We are running into this same issue.

Thanks in advance!
Kate


On Sunday, April 1, 2012 4:27:50 AM UTC-7, relluf wrote:
I am now using version 1.5.0 (Cordova) and "disabled the internal
PhoneGap frame" as suggested by TimW:
http://groups.google.com/group/phonegap/msg/7beee231774af8c9

I can report that my app is working just fine now. Plugins/callbacks
to native code are working correctly. I am not quite sure (yet) what
the side effects of "disabling the internal PhoneGap frame" might be,
just wanted to post here ASAP.

Ralph

On Wed, Feb 8, 2012 at 5:35 AM, Kerri Shotts <kerri...@gmail.com> wrote:
> Doesn't solve the real issue, but you might go for iScroll instead if you
> have to get something out. Of course, it has its own share of problems, but
> doesn't have this particular issue.
>
> I tried the overflow-scrolling in my app as well and found that it didn't
> work as needed. Too many things went entirely wonky. Switched back to
> iScroll.
>
> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to

Amir

unread,
Apr 27, 2012, 12:22:07 PM4/27/12
to phonegap
Hi All

I have file a bug request here. Please vote to get someone at PhoneGap
look into this issue.

https://issues.apache.org/jira/browse/CB-593

Thanks!

Isaac Rothenbaum

unread,
Feb 26, 2014, 12:30:37 PM2/26/14
to phon...@googlegroups.com, wi...@bohemian.cc
Was this ever solved? Here it is almost 2 years later and I've just run into this exact issues. After an extensive google search I've come up with many half solutions, but no silver bullets.

Any update here?
Reply all
Reply to author
Forward
0 new messages