From: Andy Allan Date: Thu, 24 Feb 2011 14:16:24 +0000 (+0000) Subject: Remove the keyboard event listener from the delete and add buttons - this is now... X-Git-Tag: 2.0~26 X-Git-Url: https://git.openstreetmap.org/potlatch2.git/commitdiff_plain/39ee454ee7497e0791da9ced6626edfe9511288e Remove the keyboard event listener from the delete and add buttons - this is now done globally as per [25366] --- diff --git a/net/systemeD/potlatch2/TagViewer.mxml b/net/systemeD/potlatch2/TagViewer.mxml index a4b35bbe..be77acef 100644 --- a/net/systemeD/potlatch2/TagViewer.mxml +++ b/net/systemeD/potlatch2/TagViewer.mxml @@ -490,26 +490,11 @@ setupAdvanced(selectedEntity); } - /** - * When you enter a new tag and press enter, the focus moves to the add button - * Adding an event listener to the button and listening for + means that you - * can add two consecutive tags with the same keypress. This relies on focus - * moving to the "add" button, though, so it's not robust to rearranging the UI. - */ - private function advancedAddButtonKeyboardEvent(event:KeyboardEvent):void { - switch (event.keyCode) { - case 187: addNewTag(); break; // + - add tag - case 107: addNewTag(); break; // numpad plus - } - } - private var listeningToRelations:Array = []; private function setupAdvanced(entity:Entity):void { if (!advancedTagGrid) advancedContainer.createComponentsFromDescriptors(); // if Flex hasn't created it, force it advancedTagGrid.init(entity); - advancedAddButton.addEventListener(KeyboardEvent.KEY_DOWN, advancedAddButtonKeyboardEvent, false, 0, true); - advancedDeleteButton.addEventListener(KeyboardEvent.KEY_DOWN, advancedAddButtonKeyboardEvent, false, 0, true); if ( entity == null ) { advancedID.htmlText = "";