Skip to content

Commit

Permalink
more robust check for enter key in TextBox (matplotlib#19262)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhi committed Jan 9, 2021
1 parent 5417682 commit fce0ee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/matplotlib/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ def _keypress(self, event):
self._rendercursor()
if self.eventson:
self._observers.process('change', self.text)
if key == "enter":
if key in ["enter", "return"]:
self._observers.process('submit', self.text)

def set_val(self, val):
Expand Down

0 comments on commit fce0ee8

Please sign in to comment.