GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — - tile map editor: fixed the backspace key · onaluf/gameQuery@e6c39b0

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • tools/tilemapEditor/js
    • script.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tools/tilemapEditor/js/script.js‎

Copy file name to clipboardExpand all lines: tools/tilemapEditor/js/script.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,17 +410,17 @@ $(function(){
410410
});
411411

412412
// Handle the backspace key
413-
$(window).keyup(function(event){
414-
if(event.keyCode == '8') {
413+
$(document).keydown(function(event){
414+
if(event.keyCode == '8' && event.srcElement.tagName !== "input") {
415415
var coordinate = $(".grid.selected").data(GRID_NS);
416416
if(coordinate !== undefined){
417417
var tile = $(".tile.col_"+coordinate.x+".row_"+coordinate.y);
418418
if(tile.size() > 0){
419419
tile.removeData(TILE_NS);
420420
tile.remove();
421421
}
422+
event.preventDefault();
422423
}
423-
return false;
424424
}
425425
});
426426

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.