Closed skchen28 closed 6 years ago
Let me be perfectly clear here: IE8, as well as the operating systems that allow you to use it, have all been discontinued for years now. For IE8 specifically, it was discontinued in January 2016, which is almost three years ago. Your browser does not receive security updates, and the OS you're using it in does not receive security updates.
So while I'm sorry to hear that you've run into a problem, the problem is the fact that you're using IE8, not this HOC, and the solution here (as much as you don't want to hear it) is to use a browser that actually supports today's internet. The first IE that qualifies there is IE10, but that has also been discontinued, and the only version of IE that receives security updates is IE11. And if you can run IE11, you can run Microsoft Edge, and you should.
And if your computer is too old, then at this point in time the choice is between running a compromised browser on a compromised OS, or switching to a low-requirements linux and using a modern browser like Firefox. I will recommend doing the latter every single day of the week.
Thanks anyway.
Whilst true, it's not how business works. IE (not EDGE) browsers are 26,50% of my total traffic out of which: 10.41% is IE8. I could lose almost 3% of the revenue if I drop the IE8 support... or maybe I would lose less than that since users would force-upgrade?
Actually, there is a library: https://www.npmjs.com/package/react-onclickoutside-ie8 which is fork of this project with added IE8 support which I've created 3 years ago.
It has stopped working with the recent versions of React, due to createClass
being removed. I've fixed it just now in: 5.7.5
tag.
Github: https://github.com/tomekit/react-onclickoutside NPM: https://www.npmjs.com/package/react-onclickoutside-ie8
Enjoy !
If you need to support IE because that's your job then you already know where to get polyfills for all the things that IE11 and below plain old don't support because they're not compatible with the current state of the web. There's a link to the de factor dom4 shim in the README, if you need anything more specific, then as maintainer of a site that has to work in legacy setting, your job simply involves a bit more work than devs that only have to focus on modern browsers.
If you stand to lose 3% income because of old or even unsupported versions of browsers, then you know full well it's not the responsibility of individual libraries to "work with those versions". That's yours, and I say that as someone who's had paid jobs in the past that were literally that. If you need to support old or dead tech, you're on the hook to find the shims and polyfills you need. No one else.
(forking a project specifically for IE8 instead of making sure you have polyfills loaded so that every library works instead of just the one--while understandable if that's the only library you rely on that doesn't play ball--is "solving the symptom" instead of "solving the problem")
Point taken. I am not a JS / front-end dev, however it is my responsibility to support the old IE. It is not my business decision. Despite that I've did my best 3 years ago providing the solution for people who wanted to use your library (which is really great !) on IE8. Perhaps it's only me needing that, I've still made an effort to publish this, so other people can use it.
Yeah maybe I could load some polyfils, or maybe publishing simple GIST with the solution to IE8 would do, but my point is that I haven't mentioned anywhere that IE8 support is responsibility of your library.
Anyway, thanks for your work.
Hello, everyone, I have met a problem these days. I have to support IE8 . Here is my difficulty. I find that onClickOutside HOC don't work in IE8. That's my demo code:
`const React = require('react'); const ReactDOM = require('react-dom');
const onClickOutside = require('react-onclickoutside').default;
class H5 extends React.Component{ constructor(){ super(); this.handleClickOutside = this.handleClickOutside.bind(this); }
}
const H5Wrapper = onClickOutside(H5);
class Test extends React.Component {
}
ReactDOM.render( , document.getElementById('root'));
`
Can anyone help me? Thanks for your reading.