Repository navigation
fix: 홈 웹뷰의 외부 링크를 OS 브라우저로 연다 #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
seongwon030
wants to merge
1
commit into
fix/external-link-session-id
from
fix/external-link-open-in-browser
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
git diff --no-ext-diff --unified=50 00423979c4e6a85701a0eac2bcbbe18c89de3898 d386506bc63b873c925fb43ca4945d722b39b2ca -- ui/home/home-webview-screen.tsx rg -n -C 5 'loaded|onShouldStartLoadWithRequest|onNavigationStateChange|WebView' ui/home/home-webview-screen.tsxRepository: Moadong/moadong-react-native
Length of output: 11402
🏁 Script executed:
Repository: Moadong/moadong-react-native
Length of output: 5950
🌐 Web query:
react-native-webview 13.15.0 Android onShouldStartLoadWithRequest server redirects callback contract💡 Result:
🌐 Web query:
official Android WebViewClient shouldOverrideUrlLoading not called redirects💡 Result:
🌐 Web query:
github react-native-webview v13.15.0 RNCWebViewClient shouldOverrideUrlLoading onShouldStartLoadWithRequest Android source💡 Result:
Android에서 서버 리다이렉트를 사용자 이동으로 처리하지 마세요.
handleLoadEnd이후loaded는true입니다. Android의WebViewClient.shouldOverrideUrlLoading은 HTTP 리다이렉트에서도 호출될 수 있으며,react-native-webview13.15.0은 이 URL을onShouldStartLoadWithRequest로 전달합니다.따라서 초기 로드가 끝난 뒤 내부 링크가 외부 HTTP(S) URL로 리다이렉트되면 현재 분기가 실행될 수 있습니다. 이 코드는 리다이렉트를 사용자 이동으로 판단하고
WebBrowser.openBrowserAsync로 열며 WebView 이동을 취소합니다. 이전처럼 WebView 내에서 처리해야 하는 서버 리다이렉트의 동작이 변경됩니다.Android 네이티브 계층에서 리다이렉트 여부를 전달하고, 리다이렉트에는 외부 브라우저 분기를 적용하지 마세요. 직접 사용자 이동에만 현재 브라우저 열기 동작을 적용해야 합니다.
🤖 Prompt for AI Agents