iOS native scrolling throws error #630

Closed
Fresheyeball opened this Issue Oct 30, 2012 · 2 comments

Comments

Projects
None yet
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

This comment has been minimized.

Show comment
Hide comment
@mislav

mislav Nov 11, 2012

Collaborator

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

Collaborator

mislav commented Nov 11, 2012

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

@mislav

This comment has been minimized.

Show comment
Hide comment
@mislav

mislav Dec 23, 2012

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.

Collaborator

mislav commented Dec 23, 2012

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 Dec 23, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment