Comments (8)
I think the inability to render color preview in text input was indeed one of the main reasons I removed the support for IE 9 too.
I don't plan to maintain partial support for older browsers and having the color preview in text input is essential )-:
What you can do is try jscolor-2.1.1 or older, these versions still have polyfills for older browsers like IE9. They don't support alpha channel though and have slightly different API, but they might make a satisfactory polyfill.
from jscolor.
Thanks @matafokka. Before I look into this, can you please specify which browser and version yields the error?
document.createEvent is apparently an old-fashioned way of creating events, that's why I rather use new Event
approach, which is recommended.
I might add document.createEvent as a fallback, if it turns out that the error occurs in a browser that still ought to be supported.
from jscolor.
Can you please specify which browser and version yields the error?
Chrome 14 and IE9. I haven't tested it with old Firefox versions yet.
I might add document.createEvent as a fallback
Yes, I think, this will be the best option since document.createEvent()
is deprecated and might be removed later. I'll do the same in my project, thanks for making me check the docs and see the notice :)
And thank you for looking into my issue!
from jscolor.
Thanks for additional info.
Neither Chrome 14 nor IE 9 is meant to be supported, they are almost 10 years old now. The oldest IE version supported is IE 10.
So I don't see any point adding fallback for document.createEvent. There would be other problems in these browsers anyway.
from jscolor.
Neither Chrome 14 nor IE 9 is meant to be supported
Well, that's unfortunate because I wanted to use your library as a polyfill.
Though, there is a point in adding a fallback, Chrome 14 works almost perfectly with it (except that it doesn't show the color in input itself):
I haven't figured out issues with IE though, but I'm going to investigate further. Problem may be related to my code because IE says that the error occurs in HTML file :D Well, IE can behave like that sometimes.
from jscolor.
Thank you, gonna install it right now. Please, consider documenting it because your library is ideal for polyfilling, and some might still want to support IE9-.
By the way, if someone wants to fork and add support for IE9, I figured out what's wrong, debug mode correctly shows errors. After applying the fallback it doesn't want to set CSS property at line 548. But, as you said, there're probably more things to do to run it in IE. So I totally support your decision to drop support for such an evil creation straight out of the darkest depths of hell made by satan himself.
from jscolor.
Thanks @matafokka. Tried to pull documentation for 2.1.1, but found out that docs didn't even exist at that point.
PS: IE9 doesn't support base64 encoded images (*), and jscolor uses them to render a canvas-generated chessboard image that denotes transparency in color preview. That's why I decided to drop support for IE9 in jscolor-2.2 and above.
EDIT: * The above is not factually true, but I think there was some kind of deal-breaker in rendering color preview this way in IE9.
from jscolor.
Tried to pull documentation for 2.1.1, but found out that docs didn't even exist at that point.
No problem, API is relatively simple, so I think I'll figure it out.
IE9 doesn't support base64 encoded images, and jscolor uses them to render a canvas-generated chessboard image
Oh, in this case, you can draw chessboard using fillRect()
which in theory should even improve performance.
If you're using canvas, there shouldn't be any pitfalls (or I just haven't found them yet). If there are, you can add support for alpha channel by creating a dedicated input for it.
Anyway, thank you for support, I'm just gonna use the older version. Fortunately, I don't need alpha channel, so lack of it won't affect my project.
from jscolor.
Related Issues (20)
- Suggested fixes to npm install HOT 17
- Can jscolor work with multi intances? HOT 2
- Request: Return old default functionality from 2.1.1 to now HOT 11
- Missing minified version since 2.0.4 HOT 5
- Suggestion HOT 1
- Click and drag handlers not registered in module mode HOT 6
- Importing via npm seems to break in safari HOT 1
- Ideas HOT 2
- Container option breaking on resize HOT 9
- Suggestions for website HOT 1
- jscolor does not init automatically (jQuery) HOT 7
- api function to check if picker is being displayed. HOT 2
- Thank you! HOT 1
- can not work in the dynamic input tag HOT 5
- Dynamic content generation HOT 2
- how can I trigger jscolor open and close by js code HOT 3
- Add it to npm or bower HOT 1
- version number HOT 1
- Actual version in bower repo HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jscolor.