Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java	(revision 415)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java	(revision 416)
@@ -15,4 +15,5 @@
 import java.awt.event.FocusAdapter;
 import java.awt.event.FocusEvent;
+import java.awt.event.KeyAdapter;
 import java.awt.event.KeyEvent;
 import java.awt.event.MouseAdapter;
@@ -149,10 +150,12 @@
 		};
 		final JDialog dlg = optionPane.createDialog(Main.parent, tr("Change values?"));
-		valueField.addActionListener(new ActionListener(){
+
+		valueField.getEditor().addActionListener(new ActionListener() {
 			public void actionPerformed(ActionEvent e) {
+				dlg.setVisible(false);
 				optionPane.setValue(JOptionPane.OK_OPTION);
-				dlg.setVisible(false);
 			}
 		});
+
 		String oldValue = valueField.getEditor().getItem().toString();
 		dlg.setVisible(true);
