Skip to content

Conversation

@cskime
Copy link
Collaborator

@cskime cskime commented Aug 14, 2025

📝 작업 내용

  • 브라우저 창 크기를 변경할 때 dropdown과 modal의 위치 및 크기를 변경된 크기에 맞게 갱신하도록 수정합니다.
  • Dropdown은 화면 전체를 덮는 container 안에서 absolute position으로 top, left 값을 설정해서 위치를 결정하기 때문에, 브라우저 창 크기가 변경될 때마다 resize event handler에서 dropdown을 trigger한 요소의 위치를 기준으로 dropdown 위치를 다시 계산합니다.
  • Modal은 화면 전체를 덮는 container를 absolute가 아닌 fixed position으로 변경하여, 브라우저 창 크기가 줄어들어 스크롤이 되더라도 항상 브라우저 창 전체를 덮도록 고정합니다.

📷 스크린샷 (선택)

다음 순서로 결과물을 직접 확인해 볼 수 있습니다.

  1. 제 repository를 remote로 추가합니다. (https://github.com/cskime/rolling.git)
  2. 제 repository의 feature/#25 branch를 checkout 합니다. (local에 같은 이름의 branch 생성)
  3. npm run dev 명령어로 프로젝트를 실행합니다.
  4. /test-components path로 이동합니다.
  5. 가장 오른쪽에 있는 dropdown TextField를 클릭해서 dropdown을 열고 브라우저 창 크기를 바꿔가며 dropdown 위치가 잘 이동하는지 확인합니다.
  6. 'Show Modal' 버튼을 클릭해서 modal을 열고 브라우저 창 크기를 바꿔가며 화면 크기가 바뀌거나 scroll 해도 modal이 항상 가운데에 위치하는지 확인합니다.

cskime added 3 commits August 13, 2025 17:53
Window size가 줄어들 때 dropdown type의 `TextField` component가 이동하는 경우 dropdown 위치가 갱신되지 않는 문제를 재현하기 위해 test page 수정
Scroll이 발생하더라도 fixed position이므로, scroll 하더라도 최초 화면 전체에 띄워진 위치가 고정된다.
@cskime cskime added the fix 버그 및 오류 수정 label Aug 14, 2025
@cskime cskime merged commit 03c5031 into codeit-FE-18-part2:develop Aug 14, 2025
@cskime cskime deleted the feature/#25 branch August 14, 2025 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 버그 및 오류 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

브라우저 창 크기가 변경될 때 dropdown 또는 modal container의 layout이 갱신되지 않는 문제

3 participants