[Grace-core] Backstop

Timothy Jones tim at ecs.vuw.ac.nz
Tue Jun 7 21:58:55 PDT 2016


On 08/06, Andrew P. Black <black at cs.pdx.edu> wrote:
> It stops the backspace key from making Chrome go “back” to the
> previous web page, which is really annoying when you think you are
> editing a Grace program in the browser-based editor.

You can also implement this directly on the page with something like:

document.addEventListener("keydown", function (event) {
  if (event.which === 8) {
    event.preventDefault();
  }
});

-- 
Tim


More information about the Grace-core mailing list