Skip to content

Commit

Permalink
Update comments in ElementDocument::Show based on #515
Browse files Browse the repository at this point in the history
  • Loading branch information
mikke89 committed Sep 26, 2023
1 parent 70d0d5e commit a602da2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/Core/ElementDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,12 @@ void ElementDocument::Show(ModalFlag modal_flag, FocusFlag focus_flag)
break;
}

// Set to visible and switch focus if necessary
// Set to visible and switch focus if necessary.
SetProperty(PropertyId::Visibility, Property(Style::Visibility::Visible));

// We should update the document now, otherwise the focusing methods below do not think we are visible
// If this turns out to be slow, the more performant approach is just to compute the new visibility property
// Update the document now, otherwise the focusing methods below do not think we are visible. This is also important
// to ensure correct layout for any event handlers, such as for focused input fields to submit the proper caret
// position.
UpdateDocument();

if (focus)
Expand Down

0 comments on commit a602da2

Please sign in to comment.