ondras / wwwsqldesigner

WWW SQL Designer, your online SQL diagramming tool
https://sql.toad.cz/?keyword=online_library
BSD 3-Clause "New" or "Revised" License
2.87k stars 725 forks source link

Support using plain delete (backspace) key to delete rows/tables #52

Closed ondras closed 9 years ago

ondras commented 9 years ago

From ober.14@osu.edu on November 10, 2009 20:04:58

What steps will reproduce the problem? 1. Press Delete (command-delete) -- selected row/table gets deleted.

  1. Press plain delete ("backspace" on PCs) -- the browser goes to the previous page in the history. What is the expected output? What do you see instead? On Macs, backspace is the customary key used to delete things. It should work just like delete does on PCs. What version of the product are you using? On what operating system? r61 Please provide any additional information below. Implemented in the attached patch. Tested on most recent Safari, Opera and Firefox on OS X 10.6.1. Works fine. This functionality is only enabled on Macs. On PCs, delete is the right key to use, not backspace. Opera on Mac needed the well-known workaround, the latter is not applied on any other browser/platform for performance reasons.

Attachment: mac-delete.patch

Original issue: http://code.google.com/p/wwwsqldesigner/issues/detail?id=45

ondras commented 9 years ago

From ondrej.zara on November 10, 2009 13:31:24

I believe that a built-in functionality of a browser should not be changed. The backspace key works as a "back" button, the same goes for alt-left. I do not want to redefine behavior of these keys, as this would confuse users which might be used to using them in standard fashion.

ondras commented 9 years ago

From ober.14@osu.edu on November 10, 2009 16:51:52

I've added an option to enable this functionality, the complete patch is attached. I'm not head-over-heels about including this, so if you're strongly disinclined I'm of course OK. This was, more than anything, an exercise on my way to learning JS :)

If anyone on a Mac would like it, all it takes is to download & apply the patch, so no biggie there.

As for built-in browser functionality, when it comes to using a browser as an sql designer, the browser is but a virtual machine. The notion of navigation is at odds with running something like this, IMHO. Heck, I'd be very pissed (BTDT) if I, say, accidentally pressed backspace and lost my work -- luckily these days sane browsers will recover all of the state correctly when you go forward. I think there's more to this argument, though, and I'm fairly inexperienced here, so this is all with a spoonful of salt.

Attachment: mac-delete.patch

ondras commented 9 years ago

From atrop...@gmail.com on December 27, 2009 12:07:53

I also had an issue where I lost changes because I clicked backspace when I thought I was editing text. It caused me to save after every change from then on, which is not very productive.

Alt - left arrow still works as back, as does the back button. I agree that using your browser for this sort of task changes the expected behavior of the browser.
However, misclicking a text field you plan to change the name of and instead losing all your work is a worse user experience than losing the navigation abilities of the back button.

ondras commented 9 years ago

Closing for inactivity.