Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

iOS native scrolling throws error #630

Closed
Fresheyeball opened this Issue · 2 comments

2 participants

@Fresheyeball

TypeError: 'undefined' is not an object (evaluating 'callback.apply')

function add(element, events, fn, selector, getDelegate, capture){
  capture = !!capture
  var id = zid(element), set = (handlers[id] || (handlers[id] = []))
  eachEvent(events, fn, function(event, fn){
    var delegate = getDelegate && getDelegate(fn, event),
      callback = delegate || fn
    var proxyfn = function (event) {
      var result = callback.apply(element, [event].concat(event.data)) // this line fails
      if (result === false) event.preventDefault()
      return result
    }
    var handler = $.extend(parse(event), {fn: fn, proxy: proxyfn, sel: selector, del: delegate, i: set.length})
    set.push(handler)
    element.addEventListener(handler.e, proxyfn, capture)
  })
}
@mislav
Collaborator

This lacks info. Can you help us reproduce this by creating a JSfiddle that demonstrates the bug on a touch device?

@mislav
Collaborator

Closing due to lack of info. Please comment on this issue if you have more information, such as version and modules of Zepto used, and iOS version.

@mislav mislav closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.