I found when playing with my app that the iPhone puts a delay on the
Click event which makes the app feel sluggish. I also wanted an
onclick highlight or active feature added to my app so the user knows
they clicked.
I wrote the code below. I use XUI and just added this code right
below the definition of the fire event (for me, around line 500). Now
instead of calling
x$('#elementID').click(callback);
i use
x$('#elementID').fastClick(callback);
it applies the 'highlight' class to the element which gives the user
feed back that they've clicked the element.
This code has a bug though, when scrolling on a touch screen, if your
swipe starts by landing on an element with the fastClick event the
'highlight' class is applied to that element for a brief moment which
I don't like. Anyone see how I might be able to prevent that?
What have you guys done to fix the click delay problem and get an
active or highlight feature? Did I waist my time, is thier something
already written to handle this?
> I found when playing with my app that the iPhone puts a delay on the
> Click event which makes the app feel sluggish. I also wanted an
> onclick highlight or active feature added to my app so the user knows
> they clicked.
> I wrote the code below. I use XUI and just added this code right
> below the definition of the fire event (for me, around line 500). Now
> instead of calling
> x$('#elementID').click(callback);
> i use
> x$('#elementID').fastClick(callback);
> it applies the 'highlight' class to the element which gives the user
> feed back that they've clicked the element.
> This code has a bug though, when scrolling on a touch screen, if your
> swipe starts by landing on an element with the fastClick event the
> 'highlight' class is applied to that element for a brief moment which
> I don't like. Anyone see how I might be able to prevent that?
> What have you guys done to fix the click delay problem and get an
> active or highlight feature? Did I waist my time, is thier something
> already written to handle this?
> On Oct 5, 4:42 pm, Tom Krones <tkro...@gmail.com> wrote: > > Hello,
> > I found when playing with my app that the iPhone puts a delay on the > > Click event which makes the app feel sluggish. I also wanted an > > onclick highlight or active feature added to my app so the user knows > > they clicked.
> > I wrote the code below. I use XUI and just added this code right > > below the definition of the fire event (for me, around line 500). Now > > instead of calling > > x$('#elementID').click(callback); > > i use > > x$('#elementID').fastClick(callback); > > it applies the 'highlight' class to the element which gives the user > > feed back that they've clicked the element.
> > This code has a bug though, when scrolling on a touch screen, if your > > swipe starts by landing on an element with the fastClick event the > > 'highlight' class is applied to that element for a brief moment which > > I don't like. Anyone see how I might be able to prevent that?
> > What have you guys done to fix the click delay problem and get an > > active or highlight feature? Did I waist my time, is thier something > > already written to handle this?
> -- > You received this message because you are subscribed to the Google > Groups "phonegap" group. > To post to this group, send email to phonegap@googlegroups.com > To unsubscribe from this group, send email to > phonegap+unsubscribe@googlegroups.com<phonegap%2Bunsubscribe@googlegroups.c om> > 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
Another bug that I've found is that touchstart/touchend doesn't work on computers with mice, only on touch screens which makes the app no longer usable when browsing/debugging on a computer. Any ideas on how I might check if touchstart or touchend are valid events and if not use click?
On Tue, Oct 5, 2010 at 7:42 AM, Tom Krones <tkro...@gmail.com> wrote: > Hello,
> I found when playing with my app that the iPhone puts a delay on the > Click event which makes the app feel sluggish. I also wanted an > onclick highlight or active feature added to my app so the user knows > they clicked.
> I wrote the code below. I use XUI and just added this code right > below the definition of the fire event (for me, around line 500). Now > instead of calling > x$('#elementID').click(callback); > i use > x$('#elementID').fastClick(callback); > it applies the 'highlight' class to the element which gives the user > feed back that they've clicked the element.
> This code has a bug though, when scrolling on a touch screen, if your > swipe starts by landing on an element with the fastClick event the > 'highlight' class is applied to that element for a brief moment which > I don't like. Anyone see how I might be able to prevent that?
> What have you guys done to fix the click delay problem and get an > active or highlight feature? Did I waist my time, is thier something > already written to handle this?
> That's much simpler and works well but how do I get the highlight feature?
> Thanks, > Tom
> On Tue, Oct 5, 2010 at 9:43 AM, Giacomo Balli <giacomoba...@gmail.com> wrote: > use ontouchend
> On Oct 5, 4:42 pm, Tom Krones <tkro...@gmail.com> wrote: > > Hello,
> > I found when playing with my app that the iPhone puts a delay on the > > Click event which makes the app feel sluggish. I also wanted an > > onclick highlight or active feature added to my app so the user knows > > they clicked.
> > I wrote the code below. I use XUI and just added this code right > > below the definition of the fire event (for me, around line 500). Now > > instead of calling > > x$('#elementID').click(callback); > > i use > > x$('#elementID').fastClick(callback); > > it applies the 'highlight' class to the element which gives the user > > feed back that they've clicked the element.
> > This code has a bug though, when scrolling on a touch screen, if your > > swipe starts by landing on an element with the fastClick event the > > 'highlight' class is applied to that element for a brief moment which > > I don't like. Anyone see how I might be able to prevent that?
> > What have you guys done to fix the click delay problem and get an > > active or highlight feature? Did I waist my time, is thier something > > already written to handle this?
> -- > You received this message because you are subscribed to the Google > Groups "phonegap" group. > To post to this group, send email to phonegap@googlegroups.com > To unsubscribe from this group, send email to > phonegap+unsubscribe@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
>> That's much simpler and works well but how do I get the highlight feature?
>> Thanks, >> Tom
>> On Tue, Oct 5, 2010 at 9:43 AM, Giacomo Balli <giacomoba...@gmail.com> wrote: >> use ontouchend
>> On Oct 5, 4:42 pm, Tom Krones <tkro...@gmail.com> wrote: >> > Hello,
>> > I found when playing with my app that the iPhone puts a delay on the >> > Click event which makes the app feel sluggish. I also wanted an >> > onclick highlight or active feature added to my app so the user knows >> > they clicked.
>> > I wrote the code below. I use XUI and just added this code right >> > below the definition of the fire event (for me, around line 500). Now >> > instead of calling >> > x$('#elementID').click(callback); >> > i use >> > x$('#elementID').fastClick(callback); >> > it applies the 'highlight' class to the element which gives the user >> > feed back that they've clicked the element.
>> > This code has a bug though, when scrolling on a touch screen, if your >> > swipe starts by landing on an element with the fastClick event the >> > 'highlight' class is applied to that element for a brief moment which >> > I don't like. Anyone see how I might be able to prevent that?
>> > What have you guys done to fix the click delay problem and get an >> > active or highlight feature? Did I waist my time, is thier something >> > already written to handle this?
>> -- >> You received this message because you are subscribed to the Google >> Groups "phonegap" group. >> To post to this group, send email to phonegap@googlegroups.com >> To unsubscribe from this group, send email to >> phonegap+unsubscribe@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
> -- > You received this message because you are subscribed to the Google > Groups "phonegap" group. > To post to this group, send email to phonegap@googlegroups.com > To unsubscribe from this group, send email to > phonegap+unsubscribe@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
> That's much simpler and works well but how do I get the highlight feature?
> Thanks, > Tom
> On Tue, Oct 5, 2010 at 9:43 AM, Giacomo Balli < <giacomoba...@gmail.com> > giacomoba...@gmail.com> wrote:
>> use ontouchend
>> On Oct 5, 4:42 pm, Tom Krones <tkro...@gmail.com> wrote: >> > Hello,
>> > I found when playing with my app that the iPhone puts a delay on the >> > Click event which makes the app feel sluggish. I also wanted an >> > onclick highlight or active feature added to my app so the user knows >> > they clicked.
>> > I wrote the code below. I use XUI and just added this code right >> > below the definition of the fire event (for me, around line 500). Now >> > instead of calling >> > x$('#elementID').click(callback); >> > i use >> > x$('#elementID').fastClick(callback); >> > it applies the 'highlight' class to the element which gives the user >> > feed back that they've clicked the element.
>> > This code has a bug though, when scrolling on a touch screen, if your >> > swipe starts by landing on an element with the fastClick event the >> > 'highlight' class is applied to that element for a brief moment which >> > I don't like. Anyone see how I might be able to prevent that?
>> > What have you guys done to fix the click delay problem and get an >> > active or highlight feature? Did I waist my time, is thier something >> > already written to handle this?
>> -- >> You received this message because you are subscribed to the Google >> Groups "phonegap" group. >> To post to this group, send email to <phonegap@googlegroups.com> >> phonegap@googlegroups.com >> To unsubscribe from this group, send email to >> <phonegap%2Bunsubscribe@googlegroups.com> >> phonegap+unsubscribe@googlegroups.com >> For more options, visit this group at >> <http://groups.google.com/group/phonegap?hl=en?hl=en> >> http://groups.google.com/group/phonegap?hl=en?hl=en
> -- > You received this message because you are subscribed to the Google > Groups "phonegap" group. > To post to this group, send email to <phonegap@googlegroups.com> > phonegap@googlegroups.com > To unsubscribe from this group, send email to > <phonegap+unsubscribe@googlegroups.com> > phonegap+unsubscribe@googlegroups.com > For more options, visit this group at > <http://groups.google.com/group/phonegap?hl=en?hl=en> > http://groups.google.com/group/phonegap?hl=en?hl=en
With the code below, when scrolling on a touch screen, if your swipe starts by landing on an element with the fastClick event the event fires even though you were just trying to scroll the page...
> That's much simpler and works well but how do I get the highlight feature?
> Thanks, > Tom
> On Tue, Oct 5, 2010 at 9:43 AM, Giacomo Balli <giacomoba...@gmail.com>wrote:
>> use ontouchend
>> On Oct 5, 4:42 pm, Tom Krones <tkro...@gmail.com> wrote: >> > Hello,
>> > I found when playing with my app that the iPhone puts a delay on the >> > Click event which makes the app feel sluggish. I also wanted an >> > onclick highlight or active feature added to my app so the user knows >> > they clicked.
>> > I wrote the code below. I use XUI and just added this code right >> > below the definition of the fire event (for me, around line 500). Now >> > instead of calling >> > x$('#elementID').click(callback); >> > i use >> > x$('#elementID').fastClick(callback); >> > it applies the 'highlight' class to the element which gives the user >> > feed back that they've clicked the element.
>> > This code has a bug though, when scrolling on a touch screen, if your >> > swipe starts by landing on an element with the fastClick event the >> > 'highlight' class is applied to that element for a brief moment which >> > I don't like. Anyone see how I might be able to prevent that?
>> > What have you guys done to fix the click delay problem and get an >> > active or highlight feature? Did I waist my time, is thier something >> > already written to handle this?
>> -- >> You received this message because you are subscribed to the Google >> Groups "phonegap" group. >> To post to this group, send email to phonegap@googlegroups.com >> To unsubscribe from this group, send email to >> phonegap+unsubscribe@googlegroups.com<phonegap%2Bunsubscribe@googlegroups.c om> >> 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
> With the code below, when scrolling on a touch screen, if your swipe starts
> by landing on an element with the fastClick event the event fires even
> though you were just trying to scroll the page...
> Any ideas?
> On Tue, Oct 5, 2010 at 9:58 AM, Tom Krones <tkro...@gmail.com> wrote:
> > So you're saying do something like this?
> > That's much simpler and works well but how do I get the highlight feature?
> > Thanks,
> > Tom
> > On Tue, Oct 5, 2010 at 9:43 AM, Giacomo Balli <giacomoba...@gmail.com>wrote:
> >> use ontouchend
> >> On Oct 5, 4:42 pm, Tom Krones <tkro...@gmail.com> wrote:
> >> > Hello,
> >> > I found when playing with my app that the iPhone puts a delay on the
> >> > Click event which makes the app feel sluggish. I also wanted an
> >> > onclick highlight or active feature added to my app so the user knows
> >> > they clicked.
> >> > I wrote the code below. I use XUI and just added this code right
> >> > below the definition of the fire event (for me, around line 500). Now
> >> > instead of calling
> >> > x$('#elementID').click(callback);
> >> > i use
> >> > x$('#elementID').fastClick(callback);
> >> > it applies the 'highlight' class to the element which gives the user
> >> > feed back that they've clicked the element.
> >> > This code has a bug though, when scrolling on a touch screen, if your
> >> > swipe starts by landing on an element with the fastClick event the
> >> > 'highlight' class is applied to that element for a brief moment which
> >> > I don't like. Anyone see how I might be able to prevent that?
> >> > What have you guys done to fix the click delay problem and get an
> >> > active or highlight feature? Did I waist my time, is thier something
> >> > already written to handle this?
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "phonegap" group.
> >> To post to this group, send email to phonegap@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> phonegap+unsubscribe@googlegroups.com<phonegap%2Bunsubscr...@googlegroups.c om>
> >> 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 towww.phonegap.com
On Tuesday, October 5, 2010 6:10:15 PM UTC-4, Giacomo Balli wrote:
> i guess accounting for clumsy users is the hardest part of > coding... ;)
> On Oct 5, 8:12 pm, Tom Krones <tkro...@gmail.com> wrote: > > With the code below, when scrolling on a touch screen, if your swipe > starts > > by landing on an element with the fastClick event the event fires even > > though you were just trying to scroll the page...
> > Any ideas?
> > On Tue, Oct 5, 2010 at 9:58 AM, Tom Krones <tkro...@gmail.com> wrote: > > > So you're saying do something like this?
> > > That's much simpler and works well but how do I get the highlight > feature?
> > > Thanks, > > > Tom
> > > On Tue, Oct 5, 2010 at 9:43 AM, Giacomo Balli <giacomoba...@gmail.com>wrote:
> > >> use ontouchend
> > >> On Oct 5, 4:42 pm, Tom Krones <tkro...@gmail.com> wrote: > > >> > Hello,
> > >> > I found when playing with my app that the iPhone puts a delay on > the > > >> > Click event which makes the app feel sluggish. I also wanted an > > >> > onclick highlight or active feature added to my app so the user > knows > > >> > they clicked.
> > >> > I wrote the code below. I use XUI and just added this code right > > >> > below the definition of the fire event (for me, around line 500). > Now > > >> > instead of calling > > >> > x$('#elementID').click(callback); > > >> > i use > > >> > x$('#elementID').fastClick(callback); > > >> > it applies the 'highlight' class to the element which gives the > user > > >> > feed back that they've clicked the element.
> > >> > This code has a bug though, when scrolling on a touch screen, if > your > > >> > swipe starts by landing on an element with the fastClick event the > > >> > 'highlight' class is applied to that element for a brief moment > which > > >> > I don't like. Anyone see how I might be able to prevent that?
> > >> > What have you guys done to fix the click delay problem and get an > > >> > active or highlight feature? Did I waist my time, is thier > something > > >> > already written to handle this?
> > >> -- > > >> 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<javascript:> > > >> To unsubscribe from this group, send email to > > >> phonegap+u...@googlegroups.com <javascript:><phonegap%2Bunsubscr...@googlegroups.c > om> > > >> 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 > towww.phonegap.com