diff --git a/src/Primary_Extension/org/lobobrowser/primary/ext/AddressField.java b/src/Primary_Extension/org/lobobrowser/primary/ext/AddressField.java index bd0271b9..c0f4c0d2 100644 --- a/src/Primary_Extension/org/lobobrowser/primary/ext/AddressField.java +++ b/src/Primary_Extension/org/lobobrowser/primary/ext/AddressField.java @@ -24,6 +24,8 @@ import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; import java.util.Collection; import java.util.Iterator; @@ -54,6 +56,35 @@ public void keyPressed(final KeyEvent e) { onKeyPressed(e); } }); + + editor.addMouseListener(new MouseListener() { + + @Override + public void mouseReleased(MouseEvent e) { + processMouseEvent(e); + } + + @Override + public void mousePressed(MouseEvent e) { + processMouseEvent(e); + } + + @Override + public void mouseExited(MouseEvent e) { + processMouseEvent(e); + } + + @Override + public void mouseEntered(MouseEvent e) { + processMouseEvent(e); + } + + @Override + public void mouseClicked(MouseEvent e) { + processMouseEvent(e); + } + }); + this.addPopupMenuListener(new PopupMenuListener() { public void popupMenuWillBecomeVisible(final PopupMenuEvent e) { onBeforePopupVisible(); diff --git a/src/Primary_Extension/org/lobobrowser/primary/ext/TextFieldComboBoxEditor.java b/src/Primary_Extension/org/lobobrowser/primary/ext/TextFieldComboBoxEditor.java index 3dcd0dab..e3c752e7 100644 --- a/src/Primary_Extension/org/lobobrowser/primary/ext/TextFieldComboBoxEditor.java +++ b/src/Primary_Extension/org/lobobrowser/primary/ext/TextFieldComboBoxEditor.java @@ -22,6 +22,7 @@ import java.awt.Component; import java.awt.event.ActionListener; +import java.awt.event.MouseListener; import javax.swing.ComboBoxEditor; import javax.swing.JTextField; @@ -111,6 +112,10 @@ public void addKeyListener(final java.awt.event.KeyListener listener) { this.textField.addKeyListener(listener); } + public void addMouseListener(MouseListener listener) { + this.textField.addMouseListener(listener); + } + public void removeKeyListener(final java.awt.event.KeyListener listener) { this.textField.removeKeyListener(listener); }