Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Old IE support #106

Merged
merged 2 commits into from
Nov 1, 2013
Merged

Old IE support #106

merged 2 commits into from
Nov 1, 2013

Conversation

scottgonzalez
Copy link
Contributor

These are the changes necessary to be able to get PointerEvents working in old IE. The first commit removes anything that will break in old IE. The second commit provides hooks to implement the IE-specific logic.

@scottgonzalez
Copy link
Contributor Author

There was one actual API change. We had to convert the size property in pointermap.js to a function because we can't polyfill getters.

@@ -48,7 +48,7 @@
var i = this.ids.indexOf(inId);
return this.pointers[i];
},
get size() {
size: function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks touch.js use of pointermap.size, and violates the Map API.

I think we need to have a more generic function that wraps this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is in IE 6-8, just defining the getter throws a syntax error so it can't be used. We could fix the issue in touch.js by using pointermap.size() but that doesn't fix the Map API violation. Any other thoughts or suggestions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the best course of action would be to slightly alter PointerMap to extend a Map, and add a non-getter pointers function.

In this case, I never write the size getter where Map is undefined, and use Map.size where it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@azakus Do you want to land that update now and then we can test with our old IE layer and update the PR?

@dfreedm
Copy link
Contributor

dfreedm commented Oct 29, 2013

I'll modify the PointerMap api and somehow you guys can rebaseline with it.

Should I send a PR to your PR?

@scottgonzalez
Copy link
Contributor Author

You can just update in master and we'll rebase on top of that and force push to update the PR.

@dfreedm
Copy link
Contributor

dfreedm commented Oct 29, 2013

With c1d7830, drop changes to pointermap.js and the tests and replace size() with pointers()

kborchers and others added 2 commits October 30, 2013 22:31
@scottgonzalez
Copy link
Contributor Author

This has been rebased.

@dfreedm
Copy link
Contributor

dfreedm commented Nov 1, 2013

LGTM, thanks for all the hard work!

dfreedm added a commit that referenced this pull request Nov 1, 2013
@dfreedm dfreedm merged commit 8efd3a8 into jquery-archive:master Nov 1, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants