Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,17 @@ @implementation RCTParagraphTextView {
CAShapeLayer *_highlightLayer;
}

// TODO(szymczak): this is temporary fix for
// https://app.asana.com/1/236888843494340/project/1199705967702853/list/1204187545226790,
// we should remove this after we find a better solution
- (id<CAAction>)actionForLayer:(CALayer *)layer forKey:(NSString *)event
{
// Disable all implicit animations on this layer to prevent unwanted
// scale/position animations when a modal presentation's animation context
// is active (UIKit's presentViewController:animated:YES).
return (id)[NSNull null];
}

- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
return nil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#import <React/RCTLog.h>
#import <React/RCTUtils.h>

#import <QuartzCore/CATransaction.h>

#import "RCTConversions.h"

using namespace facebook::react;
Expand Down Expand Up @@ -103,8 +105,14 @@ - (void)updateLayoutMetrics:(const LayoutMetrics &)layoutMetrics
} else {
// Note: Changing `frame` when `layer.transform` is not the `identity transform` is undefined behavior.
// Therefore, we must use `center` and `bounds`.
// TODO(szymczak): this is temporary fix for
// https://app.asana.com/1/236888843494340/project/1199705967702853/list/1204187545226790,
// we should remove this after we find a better solution
[CATransaction begin];
[CATransaction setDisableActions:YES];
self.center = CGPoint{CGRectGetMidX(frame), CGRectGetMidY(frame)};
self.bounds = CGRect{CGPointZero, frame.size};
[CATransaction commit];
}
}

Expand Down
Loading