Log In  

[Adding this myself as I'm now using this forum as a bug-tracker :)]

When trying to comment on a cartridge that is still running in the same page, cursor key and space bar presses are ignored.

Work-around until fixed: close the cart before commenting.

For testing:

Cart #9970 | 2015-04-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
33

P#10490 2015-05-05 17:44 ( Edited 2015-05-11 18:24)

This may work:

function onKeyDown_blocker(event) {
                    event = event || window.event;
                    var o = document.activeElement;
                    if (!o || o == document.body || o.tagName == "CANVAS")
                    if (playarea_state == 1) // only while cartridge is active
                    if ([32, 37, 38, 39, 40].indexOf(event.keyCode) > -1)
                    {
                        if (event.preventDefault) event.preventDefault();
                    }
                }
P#10496 2015-05-06 05:29 ( Edited 2015-05-06 09:29)

Thanks YellowAfterlife, that works perfectly.

P#10605 2015-05-11 14:24 ( Edited 2015-05-11 18:24)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-20 03:24:49 | 0.009s | Q:15