Thread: Pressing delete when editing database name can drop the database on Mac OS X
Pressing delete when editing database name can drop the database on Mac OS X
From
Charles Gutjahr
Date:
There is some weird behaviour in the Mac OS X version of pgAdmin that looks like a bug to me.
When I edit the properties of an object, say edit the name of a database, pressing the delete key attempts to drop the database. Pressing backspace works fine, it deletes a single character in the name I'm editing. Pressing delete should delete the next character, but instead it triggers the drop database dialogue. It looks the delete key is being passed back to the main window instead of the text field I'm editing.
I've tested the Windows and Mac OS X versions of pgAdmin, and it only occurs in the OS X version. In OS X pgAdmin 1.10.5 a "Drop database?" dialogue is shown when pressing delete, and in pgAdmin 1.16.0 a "Cannot drop object" dialogue is shown. The Windows pgAdmin 1.16.0 does not popup a dialogue when pressing delete.
By the way, Mac keyboards can be a little confusing. There are two buttons labelled 'delete' on a full-size Mac keyboard. The traditional backspace key is labelled 'delete', whereas the traditional delete key is labelled 'delete ⌦'. It is the second one which triggers the drop.
I take it that this isn't intended behaviour?
Cheers
Charles
Re: Pressing delete when editing database name can drop the database on Mac OS X
From
Dave Page
Date:
Hi On Mon, Oct 22, 2012 at 7:36 AM, Charles Gutjahr <charlesg@ourcommunity.com.au> wrote: > > There is some weird behaviour in the Mac OS X version of pgAdmin that looks > like a bug to me. > > When I edit the properties of an object, say edit the name of a database, > pressing the delete key attempts to drop the database. Pressing backspace > works fine, it deletes a single character in the name I'm editing. Pressing > delete should delete the next character, but instead it triggers the drop > database dialogue. It looks the delete key is being passed back to the main > window instead of the text field I'm editing. > > I've tested the Windows and Mac OS X versions of pgAdmin, and it only occurs > in the OS X version. In OS X pgAdmin 1.10.5 a "Drop database?" dialogue is > shown when pressing delete, and in pgAdmin 1.16.0 a "Cannot drop object" > dialogue is shown. The Windows pgAdmin 1.16.0 does not popup a dialogue when > pressing delete. > > By the way, Mac keyboards can be a little confusing. There are two buttons > labelled 'delete' on a full-size Mac keyboard. The traditional backspace key > is labelled 'delete', whereas the traditional delete key is labelled 'delete > ⌦'. It is the second one which triggers the drop. > > I take it that this isn't intended behaviour? Not really, no. I can't reproduce it here, but then I only have my laptop with me. I do have a full size keyboard back in the office, but I won't be there for a week or so to test. I suspect what's happening is that the dialogues don't catch the key (because it's not used by any of the controls by default) and are passing it to their parent. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company