Skip to content

Commit 2c89910

Browse files
committed
refactor: remove unwanted changes from the onPaste patch fix
1 parent 8e45337 commit 2c89910

1 file changed

Lines changed: 10 additions & 124 deletions

File tree

patches/react-native+0.77.1+011+Add-onPaste-to-TextInput.patch

Lines changed: 10 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,3 @@
1-
diff --git a/node_modules/react-native/.project b/node_modules/react-native/.project
2-
new file mode 100644
3-
index 0000000..7c5b305
4-
--- /dev/null
5-
+++ b/node_modules/react-native/.project
6-
@@ -0,0 +1,28 @@
7-
+<?xml version="1.0" encoding="UTF-8"?>
8-
+<projectDescription>
9-
+ <name>react-native-build-from-source-react-native</name>
10-
+ <comment>Project react-native-build-from-source-react-native created by Buildship.</comment>
11-
+ <projects>
12-
+ </projects>
13-
+ <buildSpec>
14-
+ <buildCommand>
15-
+ <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
16-
+ <arguments>
17-
+ </arguments>
18-
+ </buildCommand>
19-
+ </buildSpec>
20-
+ <natures>
21-
+ <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22-
+ </natures>
23-
+ <filteredResources>
24-
+ <filter>
25-
+ <id>1745005165151</id>
26-
+ <name></name>
27-
+ <type>30</type>
28-
+ <matcher>
29-
+ <id>org.eclipse.core.resources.regexFilterMatcher</id>
30-
+ <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31-
+ </matcher>
32-
+ </filter>
33-
+ </filteredResources>
34-
+</projectDescription>
351
diff --git a/node_modules/react-native/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js b/node_modules/react-native/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js
362
index 6c4bbb2..770dfee 100644
373
--- a/node_modules/react-native/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js
@@ -218,7 +184,7 @@ index d5e2e22..065a819 100644
218184
@implementation RCTUITextView {
219185
UILabel *_placeholderView;
220186
UITextView *_detachedTextView;
221-
@@ -172,7 +176,31 @@ static UIColor *defaultPlaceholderColor(void)
187+
@@ -172,7 +176,31 @@ - (void)scrollRangeToVisible:(NSRange)range
222188
- (void)paste:(id)sender
223189
{
224190
_textWasPasted = YES;
@@ -251,7 +217,7 @@ index d5e2e22..065a819 100644
251217
}
252218

253219
// Turn off scroll animation to fix flaky scrolling.
254-
@@ -264,6 +292,10 @@ static UIColor *defaultPlaceholderColor(void)
220+
@@ -264,6 +292,10 @@ - (BOOL)canPerformAction:(SEL)action withSender:(id)sender
255221
return NO;
256222
}
257223

@@ -299,7 +265,7 @@ diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInp
299265
index ac8e464..2b91802 100644
300266
--- a/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.mm
301267
+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.mm
302-
@@ -147,6 +147,11 @@ static void *TextFieldSelectionObservingContext = &TextFieldSelectionObservingCo
268+
@@ -147,6 +147,11 @@ - (void)selectedTextRangeWasSet
303269
[self textFieldProbablyDidChangeSelection];
304270
}
305271

@@ -311,7 +277,7 @@ index ac8e464..2b91802 100644
311277
#pragma mark - Generalization
312278

313279
- (void)textFieldProbablyDidChangeSelection
314-
@@ -292,6 +297,11 @@ static void *TextFieldSelectionObservingContext = &TextFieldSelectionObservingCo
280+
@@ -292,6 +297,11 @@ - (void)skipNextTextInputDidChangeSelectionEventWithTextRange:(UITextRange *)tex
315281
_previousSelectedTextRange = textRange;
316282
}
317283

@@ -336,10 +302,10 @@ index 4804624..90b7081 100644
336302
@property (nonatomic, assign) NSInteger mostRecentEventCount;
337303
@property (nonatomic, assign, readonly) NSInteger nativeEventCount;
338304
diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm
339-
index 6deea73..4d82c72 100644
305+
index 95edfd5..5111bda 100644
340306
--- a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm
341307
+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm
342-
@@ -574,6 +574,26 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
308+
@@ -574,6 +574,26 @@ - (void)textInputDidChangeSelection
343309
});
344310
}
345311

@@ -370,7 +336,7 @@ diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInput
370336
index db7c519..ec05595 100644
371337
--- a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm
372338
+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm
373-
@@ -67,6 +67,7 @@ RCT_EXPORT_VIEW_PROPERTY(onClear, RCTDirectEventBlock)
339+
@@ -67,6 +67,7 @@ @implementation RCTBaseTextInputViewManager {
374340
RCT_EXPORT_VIEW_PROPERTY(onChangeSync, RCTDirectEventBlock)
375341
RCT_EXPORT_VIEW_PROPERTY(onSelectionChange, RCTDirectEventBlock)
376342
RCT_EXPORT_VIEW_PROPERTY(onScroll, RCTDirectEventBlock)
@@ -393,7 +359,7 @@ index 0318671..667e646 100644
393359
@implementation RCTUITextField {
394360
RCTBackedTextFieldDelegateAdapter *_textInputDelegateAdapter;
395361
NSDictionary<NSAttributedStringKey, id> *_defaultTextAttributes;
396-
@@ -139,6 +143,10 @@
362+
@@ -139,6 +143,10 @@ - (BOOL)canPerformAction:(SEL)action withSender:(id)sender
397363
return NO;
398364
}
399365

@@ -404,7 +370,7 @@ index 0318671..667e646 100644
404370
return [super canPerformAction:action withSender:sender];
405371
}
406372

407-
@@ -222,7 +230,31 @@
373+
@@ -222,7 +230,31 @@ - (void)scrollRangeToVisible:(NSRange)range
408374
- (void)paste:(id)sender
409375
{
410376
_textWasPasted = YES;
@@ -441,7 +407,7 @@ diff --git a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/Text
441407
index f8358ed..91aff1a 100644
442408
--- a/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
443409
+++ b/node_modules/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
444-
@@ -481,6 +481,13 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
410+
@@ -481,6 +481,13 @@ - (void)textInputDidChangeSelection
445411
}
446412
}
447413

@@ -455,86 +421,6 @@ index f8358ed..91aff1a 100644
455421
#pragma mark - RCTBackedTextInputDelegate (UIScrollViewDelegate)
456422

457423
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
458-
diff --git a/node_modules/react-native/ReactAndroid/.project b/node_modules/react-native/ReactAndroid/.project
459-
new file mode 100644
460-
index 0000000..533e383
461-
--- /dev/null
462-
+++ b/node_modules/react-native/ReactAndroid/.project
463-
@@ -0,0 +1,34 @@
464-
+<?xml version="1.0" encoding="UTF-8"?>
465-
+<projectDescription>
466-
+ <name>ReactAndroid</name>
467-
+ <comment>Project ReactAndroid created by Buildship.</comment>
468-
+ <projects>
469-
+ </projects>
470-
+ <buildSpec>
471-
+ <buildCommand>
472-
+ <name>org.eclipse.jdt.core.javabuilder</name>
473-
+ <arguments>
474-
+ </arguments>
475-
+ </buildCommand>
476-
+ <buildCommand>
477-
+ <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
478-
+ <arguments>
479-
+ </arguments>
480-
+ </buildCommand>
481-
+ </buildSpec>
482-
+ <natures>
483-
+ <nature>org.eclipse.jdt.core.javanature</nature>
484-
+ <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
485-
+ </natures>
486-
+ <filteredResources>
487-
+ <filter>
488-
+ <id>1745005165095</id>
489-
+ <name></name>
490-
+ <type>30</type>
491-
+ <matcher>
492-
+ <id>org.eclipse.core.resources.regexFilterMatcher</id>
493-
+ <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
494-
+ </matcher>
495-
+ </filter>
496-
+ </filteredResources>
497-
+</projectDescription>
498-
diff --git a/node_modules/react-native/ReactAndroid/hermes-engine/.project b/node_modules/react-native/ReactAndroid/hermes-engine/.project
499-
new file mode 100644
500-
index 0000000..f3e5c2d
501-
--- /dev/null
502-
+++ b/node_modules/react-native/ReactAndroid/hermes-engine/.project
503-
@@ -0,0 +1,34 @@
504-
+<?xml version="1.0" encoding="UTF-8"?>
505-
+<projectDescription>
506-
+ <name>hermes-engine</name>
507-
+ <comment>Project hermes-engine created by Buildship.</comment>
508-
+ <projects>
509-
+ </projects>
510-
+ <buildSpec>
511-
+ <buildCommand>
512-
+ <name>org.eclipse.jdt.core.javabuilder</name>
513-
+ <arguments>
514-
+ </arguments>
515-
+ </buildCommand>
516-
+ <buildCommand>
517-
+ <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
518-
+ <arguments>
519-
+ </arguments>
520-
+ </buildCommand>
521-
+ </buildSpec>
522-
+ <natures>
523-
+ <nature>org.eclipse.jdt.core.javanature</nature>
524-
+ <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
525-
+ </natures>
526-
+ <filteredResources>
527-
+ <filter>
528-
+ <id>1745005165138</id>
529-
+ <name></name>
530-
+ <type>30</type>
531-
+ <matcher>
532-
+ <id>org.eclipse.core.resources.regexFilterMatcher</id>
533-
+ <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
534-
+ </matcher>
535-
+ </filter>
536-
+ </filteredResources>
537-
+</projectDescription>
538424
diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/PasteWatcher.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/PasteWatcher.java
539425
new file mode 100644
540426
index 0000000..bfb5819

0 commit comments

Comments
 (0)