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

Bug: when used with ssr and clicking into html area #41

Closed
frank-dspeed opened this issue Jan 29, 2018 · 1 comment · Fixed by #43
Closed

Bug: when used with ssr and clicking into html area #41

frank-dspeed opened this issue Jan 29, 2018 · 1 comment · Fixed by #43
Assignees
Labels

Comments

@frank-dspeed
Copy link

The problem is when i click on a part of the page that has no element so it is inside
then:

-make-delegate-event-tree.js:28 Uncaught TypeError: cur.matches is not a function
    at Object.eval (http://master.peep:3030/node_modules/can-dom-events/helpers/-make-delegate-event-tree.js:28:15)
    at String.eval (http://master.peep:3030/node_modules/can-reflect/reflections/shape/shape.js:445:21)
    at Object.eachListLike (http://master.peep:3030/node_modules/can-reflect/reflections/shape/shape.js:376:17)
    at Object.eachIndex (http://master.peep:3030/node_modules/can-reflect/reflections/shape/shape.js:338:16)
    at Object.eachKey (http://master.peep:3030/node_modules/can-reflect/reflections/shape/shape.js:443:16)
    at Object.each (http://master.peep:3030/node_modules/can-reflect/reflections/shape/shape.js:309:16)
    at HTMLHtmlElement.handler.delegated.(anonymous function) (http://master.peep:3030/node_modules/can-dom-events/helpers/-make-delegate-event-tree.js:24:16)

cur === html of the whole side as used via ssr

 "object" ["canMon Jan 29 2018 20:18:04 GMT+0000 (WET)"]0: "canMon Jan 29 2018 20:18:04 GMT+0000 (WET)"length: 1__proto__: Array(0)concat: ƒ concat()constructor: ƒ Array()copyWithin: ƒ copyWithin()entries: ƒ entries()every: ƒ every()fill: ƒ fill()filter: ƒ filter()find: ƒ find()findIndex: ƒ findIndex()forEach: ƒ forEach()includes: ƒ includes()indexOf: ƒ indexOf()join: ƒ join()keys: ƒ keys()lastIndexOf: ƒ lastIndexOf()length: 0map: ƒ map()pop: ƒ pop()push: ƒ push()reduce: ƒ reduce()reduceRight: ƒ reduceRight()reverse: ƒ reverse()shift: ƒ shift()slice: ƒ slice()some: ƒ some()sort: ƒ sort()splice: ƒ splice()toLocaleString: ƒ toLocaleString()toString: ƒ toString()unshift: ƒ unshift()Symbol(Symbol.iterator): ƒ values()Symbol(Symbol.unscopables): {copyWithin: true, entries: true, fill: true, find: true, findIndex: true, …}__proto__: Object

@justinbmeyer
Copy link
Contributor

Thanks, we were able to see this ourselves. Will fix soon.

m-mujica added a commit that referenced this issue Feb 26, 2018
The document object does not implement `Element.matches()` which is used
to tell when a selector matches an event delegated to a parent element;
using `document.documentElement` fixes the issue.

Closes #41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants