Merge pull request #1660 from davep/stop-input-double-paste

Fix double-paste into `Input`
This commit is contained in:
Dave Pearson
2023-01-24 20:55:45 +00:00
committed by GitHub
2 changed files with 2 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Fixed stuck screen https://github.com/Textualize/textual/issues/1632
- Fixed relative units in `grid-rows` and `grid-columns` being computed with respect to the wrong dimension https://github.com/Textualize/textual/issues/1406
- Fixed double-paste into `Input` https://github.com/Textualize/textual/issues/1657
## [0.10.1] - 2023-01-20

View File

@@ -256,6 +256,7 @@ class Input(Widget, can_focus=True):
def on_paste(self, event: events.Paste) -> None:
line = event.text.splitlines()[0]
self.insert_text_at_cursor(line)
event.stop()
def on_click(self, event: events.Click) -> None:
offset = event.get_content_offset(self)