Skip to content

Commit 4ca8ef4

Browse files
fix: browser input
1 parent f7f1aaa commit 4ca8ef4

File tree

6 files changed

+79
-98
lines changed

6 files changed

+79
-98
lines changed

apps/mobile/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
"react-native-gesture-handler": "2.24.0",
136136
"react-native-get-random-values": "1.11.0",
137137
"react-native-keyboard-aware-scroll-view": "0.9.5",
138-
"react-native-keyboard-controller": "1.17.1",
138+
"react-native-keyboard-controller": "1.17.3",
139139
"react-native-localize": "3.4.1",
140140
"react-native-qrcode-svg": "6.3.15",
141141
"react-native-reanimated": "3.17.5",
@@ -144,7 +144,7 @@
144144
"react-native-svg": "15.11.2",
145145
"react-native-svg-transformer": "1.3.0",
146146
"react-native-view-shot": "4.0.3",
147-
"react-native-webview": "13.13.5",
147+
"react-native-webview": "13.14.1",
148148
"react-redux": "9.2.0",
149149
"readable-stream": "4.5.2",
150150
"redux-persist": "6.0.0",

apps/mobile/src/features/browser/browser/search-bar/use-search-bar-animated-styles.ts

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Platform } from 'react-native';
21
import { useReanimatedKeyboardAnimation } from 'react-native-keyboard-controller';
32
import {
43
Extrapolation,
@@ -13,37 +12,20 @@ export function useSearchBarAnimatedStyles() {
1312
const keyboardAvoidingStyle = useAnimatedStyle(() => ({
1413
bottom: isUrlFocused.value ? -keyboardHeight.value : 0,
1514
}));
15+
1616
const browserNavigationBarStyle = useAnimatedStyle(() => {
17-
const displayStyles =
18-
Platform.OS === 'android'
19-
? {
20-
// use transform instead of zIndex as zIndex doesn't work well with webviews on android
21-
transform: progress.value >= 0.5 ? [{ translateY: 200 }] : [{ translateY: 0 }],
22-
zIndex: 100,
23-
}
24-
: {
25-
zIndex: interpolate(progress.value, [0, 1], [100, -5], Extrapolation.CLAMP),
26-
};
2717
return {
2818
opacity: interpolate(progress.value, [0, 1], [1, 0], Extrapolation.CLAMP),
29-
...displayStyles,
19+
transform: progress.value >= 0.5 ? [{ translateY: 200 }] : [{ translateY: 0 }],
20+
zIndex: 100,
3021
};
3122
});
3223
const searchBarStyle = useAnimatedStyle(() => {
33-
const displayStyles =
34-
Platform.OS === 'android'
35-
? {
36-
// use transform instead of zIndex as zIndex doesn't work well with webviews on android
37-
transform: progress.value >= 0.5 ? [{ translateY: 0 }] : [{ translateY: 200 }],
38-
zIndex: 100,
39-
}
40-
: {
41-
zIndex: interpolate(progress.value, [0, 1], [-5, 100], Extrapolation.CLAMP),
42-
};
4324
return {
4425
// no need to interpolate as progress.value is a continuous value between 0 and 1
4526
opacity: progress.value,
46-
...displayStyles,
27+
transform: progress.value >= 0.5 ? [{ translateY: 0 }] : [{ translateY: 200 }],
28+
zIndex: 100,
4729
};
4830
});
4931
return { searchBarStyle, browserNavigationBarStyle, keyboardAvoidingStyle, isUrlFocused };

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
"patchedDependencies": {
227227
"pofile@1.1.4": "patches/pofile@1.1.4.patch",
228228
"expo-secure-store@14.2.3": "patches/expo-secure-store@14.2.3.patch",
229-
"react-native-webview@13.13.5": "patches/react-native-webview@13.13.5.patch"
229+
"react-native-webview@13.14.1": "patches/react-native-webview@13.14.1.patch"
230230
}
231231
}
232232
}

packages/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"react-native-reanimated": "3.17.5",
5555
"react-native-safe-area-context": "5.4.0",
5656
"react-native-svg": "15.11.2",
57-
"react-native-webview": "13.13.5",
57+
"react-native-webview": "13.14.1",
5858
"use-events": "1.4.2"
5959
},
6060
"devDependencies": {

patches/react-native-webview@13.13.5.patch renamed to patches/react-native-webview@13.14.1.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
diff --git a/android/src/newarch/com/reactnativecommunity/webview/RNCWebViewManager.java b/android/src/newarch/com/reactnativecommunity/webview/RNCWebViewManager.java
2-
index ff2cba5f710988acafe9dbc42ca814ea8622d8c3..088a45ac3bd49d13c697d111441966a033ece6c9 100644
2+
index aa2223e0afdd226b8e1347cfdf51c43978c79a36..da0e2b669ae90e49646a9e07737550dd743517e1 100644
33
--- a/android/src/newarch/com/reactnativecommunity/webview/RNCWebViewManager.java
44
+++ b/android/src/newarch/com/reactnativecommunity/webview/RNCWebViewManager.java
5-
@@ -313,6 +313,12 @@ public class RNCWebViewManager extends ViewGroupManager<RNCWebViewWrapper>
5+
@@ -312,6 +312,12 @@ public class RNCWebViewManager extends ViewGroupManager<RNCWebViewWrapper>
6+
public void setNewSource(RNCWebViewWrapper view, @Nullable ReadableMap value) {
67
mRNCWebViewManagerImpl.setSource(view, value);
78
}
8-
9+
+
910
+ @Override
1011
+ @ReactProp(name = "source")
1112
+ public void setSource(RNCWebViewWrapper view, @Nullable ReadableMap value) {
1213
+ mRNCWebViewManagerImpl.setSource(view, value);
1314
+ }
14-
+
15+
1516
@Override
1617
@ReactProp(name = "textZoom")
17-
public void setTextZoom(RNCWebViewWrapper view, int value) {
1818
diff --git a/src/RNCWebViewNativeComponent.ts b/src/RNCWebViewNativeComponent.ts
19-
index be8ba0869c14d40d9194c489a769bf2432e3874b..f556d795ee4991b37490fa79793237e239e40970 100644
19+
index 7dd9179f1dba9ec0449d208af388887cfaa0b401..d88e9f1bbe00cbc60a3966b0ee0bf871c1104bff 100644
2020
--- a/src/RNCWebViewNativeComponent.ts
2121
+++ b/src/RNCWebViewNativeComponent.ts
22-
@@ -290,6 +290,15 @@ export interface NativeProps extends ViewProps {
22+
@@ -291,6 +291,15 @@ export interface NativeProps extends ViewProps {
2323
html?: string;
2424
baseUrl?: string;
2525
}>;

0 commit comments

Comments
 (0)