-
Notifications
You must be signed in to change notification settings - Fork 538
IE8 Fixes (part 2) #436
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
IE8 Fixes (part 2) #436
Conversation
css/annotator.css
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the proper syntax anyway, AFAIK. http://www.w3.org/TR/CSS2/selector.html#before-and-after
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proper by modern standards, yes. But the alternate syntax is supported by everything. As-is, these buttons just aren't showing up at all in IE8 because these aren't matching. We could, alternately, refactor to not use ::after at all here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I'm just saying that :after is correct and I don't know why ::after was here to begin with. If that was once the syntax, I never knew it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds like you thought I was saying ::after was proper. I think it isn't, if it ever was. I suspect it was because W3Schools thinks it is .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, :after it was correct in CSS2 - no more in CSS3: http://www.w3.org/TR/selectors/#gen-content
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. CSS3 added support for :: because they're pseudo-elements rather than pseudo-classes. But originally, the syntax was the same it seems.
The ::after notation was introduced in CSS 3 in order to establish a discrimination between pseudo-classes and pseudo-elements. Browsers also accept the notation :after introduced in CSS 2.
Source: https://developer.mozilla.org/en-US/docs/Web/CSS/::after
These handlers (well, really only the mouseup handler) were returning false, thus stopping propagation of the events and breaking other handlers, as discussed in #431. Also incorporating a change in the button check, from e.which != 1 to e.which > 1 which seems to be necessary for IE8 support (see #436). Fixes #431.
These handlers (well, really only the mouseup handler) were returning false, thus stopping propagation of the events and breaking other handlers, as discussed in #431. Also incorporating a change in the button check, from e.which != 1 to e.which > 1 which seems to be necessary for IE8 support (see #436). Fixes #431.
These handlers (well, really only the mouseup handler) were returning false, thus stopping propagation of the events and breaking other handlers, as discussed in #431. Also incorporating a change in the button check, from e.which != 1 to e.which > 1 which seems to be necessary for IE8 support (see #436). Fixes #431.
|
Rebase was a total mess, there was just too much to resolve. I went for a straight merge which was pretty simple but we've got new failing tests in IE8 on that branch again now. I'll commit up what I've got. |
|
I've got the merge working well enough to run on Chrome - but there's a lot of new code here and things have moved around. It doesn't look like there's a single quick fix for all of this in IE, I spent a while yesterday poking at it. That's all committed in our fork if someone else wants to have a go. |
|
@krues8dr @nickstenning whats the status on this guys? |
|
@aron Merged Nick's changes into our fork, but tests stopped passing in IE. He said he was going to have a look at those; I won't be able to in the immediate future. |
|
@krues8dr okay thanks for the update. Just want to ensure this branch doesn't rot, will catch up with @nickstenning. |
|
@aron The jQuery-CORS issue is probably the biggest thing to be worried about right now. The rest I would assume is manageable with the provided shims. Which reminds me, I need to transfer our shims repo to |
|
@krues8dr as far as I know you'll need one of the @openannotation/owners |
|
@aron You are totally I right, I'd just assumed you were one. :) We can start our own cool-kids club instead. |
|
Alright, so there were three parts to this pull request.
The one remaining issue relates to support for CORS in IE. Unfortunately, this is not as simple as tweaking some of the innards of jQuery. IE8 and 9 do not support CORS using
This makes IE8/9 fundamentally incompatible with a cross-domain Annotator setup. That's not to say we can't support these browsers for integrated applications (where the document being annotated and the annotator store are on the same domain), but there isn't any easy way to support these browsers for, say, the bookmarklet. IE10+ have native support for CORS through All in all, I don't think there's anything remaining for us to merge in this PR, so I'll close it. There are still some outstanding test failures on IE8 but they will be dealt with in due course. |
|
Fair point in closing this, no complaints here. Someone still needs to takeover the shim repo too for this to be "done." Also - just to recap and not to beat a dead horse - there must be a reason why forcing jQuery to think that there's support for CORS "magically" works in IE8. I'm not sure why this is, but it definitely does work for some reason. |
I'm not entirely sure there's a need for a shim repo. I want there to be clear instructions on how to deploy Annotator for legacy IE as part of the project. As such, any shims we need we will import directly into the main repo, and include in an IE-compatible build. At the moment, it's just wicked-good-xpath and the tests pass on IE9/10/11. Obviously we'll need to pull in a couple more for IE8.
Right, but I'm not particularly bothered about finding out why. The tests don't actually exercise anything to do with CORS as they run on a single domain. If I had to hazard a guess, it would be that there is error-checking in jQuery which consults |
|
It could be that IE8-9 treat origins that share a hostname as the same origin. In other words, http://localhost:4000 and http://localhost:4001 might be considered the same origin from IE's perspective. Just a random guess. |
1fc7024 changed this test from `which == 1` to `which > 1` with the explanation: > Also incorporating a change in the button check, from > > e.which != 1 > > to > > e.which > 1 > > which seems to be necessary for IE8 support (see openannotation#436). (I'm offline so can't check openannotation#436, but) this seems wrong: the only button we care about is the primary button, used to select text, and the commit and the message disagree anyway!
Three small fixes here:
rgba, and swapping::afterfor:after