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
correct slider init value and better FX slider event handling #109
Conversation
$("#preview-fps")[0].addEventListener('change', this.onFPSSliderChange.bind(this)); | ||
// the oninput event won't work on IE10 unfortunately, but at least will provide a | ||
// consistent behavior across all other browsers that support the input type range | ||
// see https://bugzilla.mozilla.org/show_bug.cgi?id=853670 |
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.
@juliandescottes It could be nice to define somewhere exact targeted browsers for piskel. I know piskel don't work for now on IE10 but it's more because of a lack of testing than non-working code on IE10. So I'm not sure about this changeset that make it not work explicitly in IE10. Unless we don't care at all about IE10.
Thoughts ?
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.
Indeed with the onchange it's less "bad" in the sense that it'll work everywhere, the user experience is just going to be a little bit worse on firefox than other browserm that's all. Your call.
On the long run, if you care about wider browser support, you're going to have to detect user agents and use both events anyway.
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.
We should ultimately support IE10. Regarding the browser support topic, I'm opening an issue to discuss it.
The sad part about this particular issue is that we can't feature-detect it, forced to use good old user agent detection.
@captainbrosset can you update this PR with a cross browser implementation ?
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.
What about using a jquery-ui slider component that encapsulate the shit ?
Instead of using a broken thing ?
On Sun, Jun 16, 2013 at 1:20 AM, Julian Descottes
notifications@github.comwrote:
In js/controller/AnimatedPreviewController.js:
@@ -18,15 +18,19 @@
};ns.AnimatedPreviewController.prototype.init = function () {
$("#preview-fps")[0].addEventListener('change', this.onFPSSliderChange.bind(this));
// the oninput event won't work on IE10 unfortunately, but at least will provide a
// consistent behavior across all other browsers that support the input type range
// see https://bugzilla.mozilla.org/show_bug.cgi?id=853670
We should ultimately support IE10. Regarding the browser support topic,
I'm opening an issue to discuss it.
The sad part about this particular issue is that we can't feature-detect
it, forced to use good old user agent detection.@captainbrosset https://github.com/captainbrosset can you update this
PR with a cross browser implementation ?—
Reply to this email directly or view it on GitHubhttps://github.com/juliandescottes/piskel/pull/109/files#r4715094
.
Firefox doesn't support <input type="range"> apparently (they will starting with Firefox 23 see https://bugzilla.mozilla.org/show_bug.cgi?id=344618). In the meantime, I'm reverting back to onchange. Otherwise, tested the fix, works great ! thanks @captainbrosset Merge ongoing ... |
Just came across this article http://benalpert.com/2013/06/18/a-near-perfect-oninput-shim-for-ie-8-and-9.html which talks about how to put in place an oninput shim for IE. |
Trying to fix issue https://github.com/juliandescottes/piskel/issues/98
2 changes done: