File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
3939- Fixed issues with animation. Now objects of different types may be animated.
4040- Fixed containers with transparent background not showing borders https://github.com/Textualize/textual/issues/1175
4141- Fixed auto-width in horizontal containers https://github.com/Textualize/textual/pull/1155
42+ - Fixed Input cursor invisible when placeholder empty https://github.com/Textualize/textual/pull/1202
4243
4344## [ 0.4.0] - 2022-11-08
4445
Original file line number Diff line number Diff line change @@ -176,6 +176,10 @@ def render(self) -> RenderableType:
176176 if self .has_focus :
177177 cursor_style = self .get_component_rich_style ("input--cursor" )
178178 if self ._cursor_visible :
179+ # If the placeholder is empty, there's no characters to stylise
180+ # to make the cursor flash, so use a single space character
181+ if len (placeholder ) == 0 :
182+ placeholder = Text (" " )
179183 placeholder .stylize (cursor_style , 0 , 1 )
180184 return placeholder
181185 return _InputRenderable (self , self ._cursor_visible )
You can’t perform that action at this time.
0 commit comments