ibireme 9 年之前
父节点
当前提交
4bbc829c51
共有 1 个文件被更改,包括 1 次插入0 次删除
  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];