@@ -1664,6 +1664,7 @@ - (void)handleWordModificationBasedChanges:(NSString *)word
16641664- (void )anyTextMayHaveBeenModified {
16651665 // we don't do no text changes when working with iOS marked text
16661666 if (textView.markedTextRange != nullptr ) {
1667+ [self handlePlaceholderVisibility ];
16671668 return ;
16681669 }
16691670
@@ -1685,13 +1686,7 @@ - (void)anyTextMayHaveBeenModified {
16851686 [mentionStyleClass manageMentionEditing ];
16861687 }
16871688
1688- // placholder management
1689- if (!_placeholderLabel.hidden && textView.textStorage .string .length > 0 ) {
1690- [self setPlaceholderLabelShown: NO ];
1691- } else if (textView.textStorage .string .length == 0 &&
1692- _placeholderLabel.hidden ) {
1693- [self setPlaceholderLabelShown: YES ];
1694- }
1689+ [self handlePlaceholderVisibility ];
16951690
16961691 // modified words handling
16971692 NSArray *currentDirtyRanges = [attributesManager getDirtyRanges ];
@@ -1747,6 +1742,16 @@ - (void)anyTextMayHaveBeenModified {
17471742 [self scheduleRelayoutIfNeeded ];
17481743}
17491744
1745+ - (void )handlePlaceholderVisibility {
1746+ // placholder management
1747+ if (!_placeholderLabel.hidden && textView.textStorage .string .length > 0 ) {
1748+ [self setPlaceholderLabelShown: NO ];
1749+ } else if (textView.textStorage .string .length == 0 &&
1750+ _placeholderLabel.hidden ) {
1751+ [self setPlaceholderLabelShown: YES ];
1752+ }
1753+ }
1754+
17501755// Debounced relayout helper - coalesces multiple requests into one per runloop
17511756// tick
17521757- (void )scheduleRelayoutIfNeeded {
0 commit comments