Skip to content

[fix] 외부지원서 리다이렉트 방식 window.location.href로 변경#1065

Merged
seongwon030 merged 7 commits intodevelop-fefrom
fix/#1064-ios-external-link-disable-MOA-534
Jan 18, 2026
Merged

[fix] 외부지원서 리다이렉트 방식 window.location.href로 변경#1065
seongwon030 merged 7 commits intodevelop-fefrom
fix/#1064-ios-external-link-disable-MOA-534

Conversation

@seongwon030
Copy link
Member

@seongwon030 seongwon030 commented Jan 18, 2026

#️⃣연관된 이슈

ex) #1064

📝작업 내용

문제

iOS Safari에서 "지원하기" 버튼 클릭 시 외부 지원서 링크로 리다이렉트되지 않는 문제

원인

  • window.open()을 비동기 함수(async/await) 내에서 호출
  • await getApplication() 이후 window.open() 호출 시점에는 사용자 제스처 컨텍스트가 끊어짐
  • iOS Safari의 팝업 차단 정책으로 인해 window.open() 호출이 차단됨

해결

window.open() 대신 window.location.href를 사용하여 현재 탭에서 외부 링크로 이동

중점적으로 리뷰받고 싶은 부분(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

논의하고 싶은 부분(선택)

논의하고 싶은 부분이 있다면 작성해주세요.

🫡 참고사항

Summary by CodeRabbit

  • 버그 수정
    • 외부 클럽 지원 양식으로 이동할 때 보안 및 팝업 차단 대응을 개선하여 내비게이션 안정성을 높였습니다.
    • 팝업이 차단되면 현재 탭으로 안전하게 이동하도록 동작을 보완했습니다.
    • 오류 발생 시 미리 열린 창을 닫아 불필요한 탭/창을 줄이고, iOS Safari 등에서 더 일관된 동작을 제공합니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Jan 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
moadong Ready Ready Preview, Comment Jan 18, 2026 11:18am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 18, 2026

Warning

Rate limit exceeded

@seongwon030 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 43 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 595da9b and 8b28137.

📒 Files selected for processing (1)
  • frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "**" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

외부지원서 URL이 존재할 때 기존 window.open 호출을 제거하고, DOM 앵커(<a>)를 생성해 href, target="_blank", rel="noopener noreferrer"를 설정한 뒤 프로그래밍적으로 클릭하여 새 탭으로 이동하도록 변경했습니다. 컴포넌트 시그니처는 변경되지 않았습니다.

Changes

Cohort / File(s) 변경 내용
외부 URL 열기 처리
frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx
window.open 대신 DOM 앵커 요소를 생성해 href에 외부 URL 할당, target="_blank"rel="noopener noreferrer" 설정 후 click()으로 네비게이션 수행하도록 수정. 내부 네비게이션 로직은 변경 없음.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related issues

Possibly related PRs

Suggested labels

🐞 Bug, 💻 FE, 🛠Fix

Suggested reviewers

  • lepitaaar
  • oesnuj
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경 사항과 일치합니다. 외부 지원서 리다이렉트 방식 변경이 주요 변경점이며, 제목에 명확히 표시되어 있습니다.
Linked Issues check ✅ Passed PR 변경 사항이 연결된 이슈 MOA-534의 요구사항을 충족합니다. iOS Safari에서 외부 지원 링크가 작동하도록 window.open() 대신 동적 앵커 요소 방식으로 변경했습니다.
Out of Scope Changes check ✅ Passed ClubApplyButton.tsx의 외부 링크 리다이렉트 방식 변경만 포함되어 있으며, 모두 MOA-534 이슈 해결과 관련된 범위 내 변경입니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@seongwon030 seongwon030 changed the title [fix] window.location.href로 변경 [fix] 외부지원서 리다이렉트 방식 window.location.href로 변경 Jan 18, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx`:
- Around line 29-51: The current navigateToApplicationForm opens a new window
after awaiting getApplication, which loses the user-gesture context and fails on
iOS Safari; change the logic so that for ApplicationFormMode.EXTERNAL you
redirect the current tab instead of opening a new window: in
navigateToApplicationForm (and where it checks formDetail?.formMode ===
ApplicationFormMode.EXTERNAL and reads formDetail.externalApplicationUrl) remove
or skip the post-API window.open flow and directly assign window.location.href =
externalApplicationUrl (fallback: only if externalApplicationUrl is falsy do
nothing); this implements the PR-preferred Method 1 and avoids popup-blocking
without reordering the await/getApplication call.

- window.open() 대신 동적 a 태그 생성 방식으로 변경
- iOS Safari의 비동기 컨텍스트 팝업 차단 문제 해결
- 코드 간소화 (복잡한 fallback 로직 제거)
- API 호출 전에 미리 빈 창을 열어 사용자 제스처 컨텍스트 유지
- API 응답 후 외부 지원서인 경우 URL 주입
- 내부 지원서이거나 에러 발생 시 열린 창 자동 닫기
This reverts commit 17a31b9.
Copy link
Collaborator

@suhyun113 suhyun113 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아이폰 유저가 아니라,,, 이런 문제가 있는지 몰랐네요
찾아보니 사파리는 사용자의 직접적인 클릭 액션 없이 발생하는 window.open 호출을 차단한다고 하네요
빠르게 원인 찾아서 해결해주셔서 아주 좋습니당~

@seongwon030 seongwon030 merged commit e192633 into develop-fe Jan 18, 2026
3 checks passed
@seongwon030 seongwon030 deleted the fix/#1064-ios-external-link-disable-MOA-534 branch January 18, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] MOA-534 아이폰에서 외부지원서로 이동되지 않는 문제를 해결한다

2 participants

Comments