File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -290,13 +290,18 @@ impl Editor {
290
290
}
291
291
292
292
fn show_text_edit_with_focus ( ui : & mut Ui , input : & mut String , request_focus : & mut bool ) {
293
- let text_edit_output = TextEdit :: singleline ( input)
294
- . code_editor ( )
295
- . margin ( Margin :: symmetric ( 2 , 0 ) )
296
- . clip_text ( false )
297
- . desired_width ( 0.0 )
298
- . min_size ( vec2 ( 10.0 , 2.0 ) )
299
- . show ( ui) ;
293
+ // Wrap in horizontal to prevent jitters when typing when children are expanded (due to use of horizontal_wrapped when rendering properties).
294
+ let text_edit_output = ui
295
+ . horizontal ( |ui| {
296
+ TextEdit :: singleline ( input)
297
+ . code_editor ( )
298
+ . margin ( Margin :: symmetric ( 2 , 0 ) )
299
+ . clip_text ( false )
300
+ . desired_width ( 0.0 )
301
+ . min_size ( vec2 ( 10.0 , 2.0 ) )
302
+ . show ( ui)
303
+ } )
304
+ . inner ;
300
305
301
306
if * request_focus {
302
307
* request_focus = false ;
You can’t perform that action at this time.
0 commit comments