Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imba events issues #24

Closed
Yotooon opened this issue Sep 6, 2015 · 2 comments
Closed

Imba events issues #24

Yotooon opened this issue Sep 6, 2015 · 2 comments

Comments

@Yotooon
Copy link

Yotooon commented Sep 6, 2015

Hello,

I've been playing with Imba for couple of days now and I am loving it so far.
Today I have been experimenting with events and it seems I'm stuck - I can't cancel the "tap" default event:

tag testing

    def taptest e
        e.cancel
        console.log e

    def render
        <self>
            <a href="#" :tap="taptest"> "Testing"

$$(body).prepend <testing>

I am also interested in using the Imba.Event.keycombo with the above code but the method spits out nothing. Am I missing something?

Any help is much appreciated.
Thanks!

@judofyr
Copy link
Collaborator

judofyr commented Sep 6, 2015

Hm. Currently the tap-event is not properly wrapping the click-event. This also needs to be consistent with the touch behavior though. We should probably have a file under test/ which demonstrates the various event handlers (e.g. :tap in a scrollable list) that can be easily tested on multiple devices.

@Yotooon
Copy link
Author

Yotooon commented Sep 6, 2015

After I've registered the "click" event and used :click=... instead of :tap=..., it worked fine.
I'm still figuring out what works best and the test folder is a big help.
Anyways, thanks for the reply. Back to coding... ;)

@somebee somebee closed this as completed Nov 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants