Obsolete
Status Update
Comments
zm...@gmail.com <zm...@gmail.com> #2
The problem is very serious.
Currently html5 clearRect isn't working within any android 4 devices.
Please, solve this problem as soon as possible.
Currently html5 clearRect isn't working within any android 4 devices.
Please, solve this problem as soon as possible.
vi...@tekliko.com <vi...@tekliko.com> #3
we have the same problem
We are waiting for a patch since November because none of the workaround we have tried is stable.
We hope that the patch will come before the launching of our app and if not...well, sadly, we will launch the app on iOS and windows only
We are waiting for a patch since November because none of the workaround we have tried is stable.
We hope that the patch will come before the launching of our app and if not...well, sadly, we will launch the app on iOS and windows only
cb...@gmail.com <cb...@gmail.com> #4
[Comment deleted]
gi...@gmail.com <gi...@gmail.com> #5
Still appears to be an issue as I'm getting quirky results when trying clearRect in a loop. #3 solution is good but too heavy to work in a loop.
so...@gmail.com <so...@gmail.com> #6
What about using requestAnimationFrame for loop rather than using a timer loop ?
gm...@gmail.com <gm...@gmail.com> #7
Hey, this is a serious issue that is affecting our production components, could someone please look into this???
bz...@gmail.com <bz...@gmail.com> #8
is there any solvtion for that issue ?
va...@gmail.com <va...@gmail.com> #9
Something like that works for me:
function bug_workaround() {
$(canvas).hide();
setTimeout(function() {
$(canvas).show();
}, 1);
}
I call this function after clear.
function bug_workaround() {
$(canvas).hide();
setTimeout(function() {
$(canvas).show();
}, 1);
}
I call this function after clear.
de...@gmail.com <de...@gmail.com> #10
Opacity trick is better because will not initiate page reflow and hide /
show will.
show will.
gm...@gmail.com <gm...@gmail.com> #11
which trick would that be? modify the opacity?
de...@gmail.com <de...@gmail.com> #12
Yes,
function bug_workaround() {
canvas.style.opacity = 0.99;
setTimeout(function() {
canvas.style.opacity = 1;
}, 1);
}
function bug_workaround() {
canvas.style.opacity = 0.99;
setTimeout(function() {
canvas.style.opacity = 1;
}, 1);
}
mk...@gmail.com <mk...@gmail.com> #13
[Comment deleted]
jh...@gmail.com <jh...@gmail.com> #14
Hi,
I'm having the same problem but the workaround doesn't seem to help. Was wondering if this issue is somehow fixed by now?
Thank You.
I'm having the same problem but the workaround doesn't seem to help. Was wondering if this issue is somehow fixed by now?
Thank You.
ex...@gmail.com <ex...@gmail.com> #15
This opacity hack works for me. I've had this issue on 4.1.1 and 4.1.2, both Galaxy S3 and the S3 mini.
Calling this function between clearing the canvas and the next draw call seems to have fixed the problem.
function bug_workaround() {
canvas.style.opacity = 0.99;
setTimeout(function() {
canvas.style.opacity = 1;
}, 1);
}
Thanks, dennis.ra!
Calling this function between clearing the canvas and the next draw call seems to have fixed the problem.
function bug_workaround() {
canvas.style.opacity = 0.99;
setTimeout(function() {
canvas.style.opacity = 1;
}, 1);
}
Thanks, dennis.ra!
en...@google.com <en...@google.com>
ni...@gmail.com <ni...@gmail.com> #16
The opacity trick doesn't seem to work for me (Android 4.3).
Hide & show causes a lot of nasty flicker.
This solution works form me:
https://medium.com/@dhashvir/android-4-1-x-stock-browser-canvas-solution-ffcb939af758
But only the second one:
canvas.clearRect(0, 0, w, h);
canvas.style.display = 'none';// Detach from DOM
canvas.offsetHeight; // Force the detach
canvas.style.display = 'inherit'; // Reattach to DOM
Performance hit seems to be minimal for my app (game with multiple canvas one over another).
Hide & show causes a lot of nasty flicker.
This solution works form me:
But only the second one:
canvas.clearRect(0, 0, w, h);
canvas.style.display = 'none';// Detach from DOM
canvas.offsetHeight; // Force the detach
canvas.style.display = 'inherit'; // Reattach to DOM
Performance hit seems to be minimal for my app (game with multiple canvas one over another).
ch...@gmail.com <ch...@gmail.com> #17
seems android 4.1/4.2/4.3 both have this problem?
Description
Samsung Galaxy 3
Stock browser
We are having problems where HTML5 canvas.clearRect only works sometimes, many times it is failing the clear the rectangle on request.
The code is being called in a timer loop.