ibireme 9 tahun lalu
induk
melakukan
4bbc829c51
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  1. 1 0
      YYText/YYTextView.m

+ 1 - 0
YYText/YYTextView.m

@@ -777,6 +777,7 @@ typedef NS_ENUM(NSUInteger, YYTextMoveDirection) {
 
 /// Keyboard frame changed, scroll the caret to visible range, or modify the content insets.
 - (void)_keyboardChanged {
+    if (!self.isFirstResponder) return;
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
         if ([YYTextKeyboardManager defaultManager].keyboardVisible) {
             [self _scrollRangeToVisible:_selectedTextRange];