Giter VIP home page Giter VIP logo

ractive-events-tap's People

Contributors

dwolner avatar evs-chris avatar fskreuz avatar jmmaranan avatar lfalor avatar martinkolarik avatar martypdx avatar rich-harris avatar rstacruz avatar ryanramage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ractive-events-tap's Issues

Can't prevent click on ie11

I have a handler that handle a tap event
and I want to prevent the click to do the action

<a href="http://www.google.ca" title="google" on-click="register:1">click here</a>
<a href="http://www.google.ca" title="google" on-tap="register:1">tap here</a>
<script>
  ractive.on('register', function(event){
    event.original.preventDefault()
    alert('YO');
    return false
  })
</script>

If i use click event, i'm not redirected to google
but I am within the tap event (on ie11)

The index property on the event is missing

The event object provides an "index" property as well which give the index of the item (if in an each block). It would be nice to have that property included in the "tap" event as well.
You can get from the keypath, but then string manipulation :(

ractive version dependency

Refs ractivejs/ractive#1366

Hi, I am using ractive-ractive and ractive-events-tap together. The only way I can get the tap event to work is to change its package.json to:

{
  "peerDependencies": {
    "ractive": "> 0.5.5"
  }
}

The package.json currently states ^[email protected]. Is that actually the lowest possible version?

Tap catches clicks on child elements

This means if I have children that I don't want to be caught inside of the tap I cannot exit because node ALWAYS returns the parent, I never can get the actual targeted element for determining whether this should be ignored or not.

Tap does not bubble through to the document

I am using ractive on a page to render some dynamic content; this page has a bunch of other plugins, including custom ones, jQuery, and Zurb Foundation Sites. The trouble is, many plugins, including Foundation, have a "live listener" - like this one:

$(document).on('click.zf.trigger', '[data-open]', function() {
  triggers($(this), 'open');
});

This event is never fired on elements that have an on-tap attribute because of this line:

event.preventDefault(); // prevent compatibility mouse event

Not sure what the best solution is if there are compatibility issues (would be interested in understanding what exactly those were). For my project, I'm simply commenting it out.

Unable to install via bower

$ bower install ractive-events-tap --save
bower                        ENOTFOUND Package ractive-events-tap not found

I doubt you have published it yet. Any chance to do so asap?

Tap not working when parameter is set in Ractive 0.9.0

Hi,

Using the latest version of Ractive (0.9.0) this plugin is not working anymore when adding a parameter after the function name:
on-tap="function:parameter"

Can you please have a look into this? Thanks a lot!

Best regards,
Roman

Taps not firing on MSEdge

For some odd reason, ractive-events-tap is broken on MS Edge.

Debugging has led me to ractive-events-tap.umd.js:70 and ractive-events-tap.umd.js:73 as being the source of the problem, but it seems that the "click" event from MS Edge returns a value for event.pointerId where as the mouseup event does not have this value. This is leading to the issue where it never fires the event handler.

Changing the event on line 115 from

this.node.addEventListener( 'click', handleMouseup, false );

to

this.node.addEventListener( 'mouseup', handleMouseup, false );

Solves this issue.

The alternative is to ignore the condition if one of the pointerIds is falsey. But I'm not aware of what the sideeffects might be.

Any advice?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.