Skip to content

Commit

Permalink
Update RCTScrollView.m
Browse files Browse the repository at this point in the history
  • Loading branch information
isidoro98 committed Nov 17, 2022
1 parent 42088b6 commit e2891a7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions React/Views/ScrollView/RCTScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#import "UIView+Private.h"
#import "UIView+React.h"
#import "UIResponder+FirstResponder.h"
#import "RCTInputAccessoryView.h"

/**
* Include a custom scroll view subclass because we want to limit certain
Expand Down Expand Up @@ -309,7 +308,6 @@ - (void)_keyboardWillChangeFrame:(NSNotification *)notification
}

double duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
if (duration == 0) return;

UIViewAnimationCurve curve =
(UIViewAnimationCurve)[notification.userInfo[UIKeyboardAnimationCurveUserInfoKey] unsignedIntegerValue];
Expand Down Expand Up @@ -340,10 +338,8 @@ - (void)_keyboardWillChangeFrame:(NSNotification *)notification
} else {
newContentOffset.y += contentDiff;
}
} else {
return;
}
} else if ([firstResponder isKindOfClass: [UITextField class]] || [firstResponder isKindOfClass: [RCTInputAccessoryView class]]) {
} else {
CGFloat contentDiff = endFrame.origin.y - beginFrame.origin.y;
if (self.inverted) {
newContentOffset.y += contentDiff;
Expand Down

0 comments on commit e2891a7

Please sign in to comment.