Skip to content

Instantly share code, notes, and snippets.

@n1mmy
Created December 7, 2012 03:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n1mmy/4230612 to your computer and use it in GitHub Desktop.
Save n1mmy/4230612 to your computer and use it in GitHub Desktop.
Meteor issue #458
<head>
<title>ie9bug_test</title>
</head>
<body>
{{> hello}}
</body>
<template name="hello">
<h1>IE9 bug</h1>
{{#with other}}x{{#with inner}}
<span class="foo">Click</span>
{{/with}}y{{/with}}
</template>
if (Meteor.isClient) {
var startTime = +new Date;
Template.hello.other = {text: "We are in the other context "};
Template.hello.otherList = function () {
return [{text: "We are in the danger context "}];
};
Template.hello.inner = {text: 'hot dog!'};
Template.hello.myList = function () {
console.log("list ", +new Date);
return [{text: "We are in the '#each' context "}];
};
var good = [];
var bad = [];
Template.hello.events({
'click .foo' : function (evt) {
good = [];
_.each(evt.target.parentNode.childNodes, function (t) {
// good.push(t);
});
//good = _.clone(evt.target.parentNode.childNodes);
console.log('foo ', this.text);
}
});
/*
var x = Meteor.setInterval(function () {
var range = LiveRange.findRange(
Spark._TAG, DomUtils.find(document, '.foo'));
var types = [];
while(range) {
types.push(range.type);
range = range.findParent();
}
console.log(+new Date, types);
if (types[1] !== 'data') {
console.log(+new Date() - startTime);
Meteor.clearInterval(x);
}
}, 10);
Meteor.setTimeout(function () {
Meteor.clearInterval(x);
}, 5000);
*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment