Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(text area): end mouse selection only if currently selecting #4436

Conversation

TomJGooding
Copy link
Contributor

@TomJGooding TomJGooding commented Apr 21, 2024

The TextArea should only invoke the _end_mouse_selection method if we're actually currently selecting with the mouse.

This will fix #4434 where currently the cursor blink is restarted after the TextArea is hidden in the TabbedContent.

Please review the following checklist.

  • Docstrings on all new or modified functions / classes
  • Updated documentation
  • Updated CHANGELOG.md (where appropriate)

@TomJGooding TomJGooding marked this pull request as ready for review April 21, 2024 13:25
@darrenburns
Copy link
Member

Thanks @TomJGooding - very minor, but would the if self._selecting maybe be better off inside the _end_mouse_selection if it's always required?

@TomJGooding
Copy link
Contributor Author

@darrenburns No problem, that's now updated. I did wonder that myself but thought the other way might better express the intent.

@darrenburns
Copy link
Member

@TomJGooding Thanks for making that change and for the fix!

@darrenburns darrenburns merged commit 1de74dc into Textualize:main Apr 22, 2024
19 checks passed
@TomJGooding TomJGooding deleted the fix-text-area-end-mouse-selection-only-if-currently-selecting branch April 22, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All TextAreas have blinking cursors after switching back to a previously selected tab
2 participants