Repository navigation
[fix] 앱 웹뷰에서 본문 텍스트를 선택·복사할 수 있게 한다 #2257
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
base: develop-fe
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,10 +8,12 @@ const WebviewGlobalStyles = createGlobalStyle` | |
| overscroll-behavior: none; | ||
| -webkit-font-smoothing: antialiased; | ||
| -webkit-text-size-adjust: 100%; | ||
| cursor: default; | ||
| } | ||
| button, [role='button'], img { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [변경 범위] 커밋 의도는 "본문 속 링크"를 선택 가능하게 하는 건데, 본문 링크만 풀고 싶다면 전역에서는 /* 전역 */
button, a, [role='button'], img { user-select: none; ... }
/* 본문 렌더 영역 스타일 */
.description a { user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; }아니면 UI용 링크 쪽에 개별로
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 반영했어요(41f9283). 다만 전역에 두 방식 모두 새 화면에서 빠뜨릴 수 있는데, 빠뜨렸을 때 결과가 달라요. 전역
|
||
| user-select: none; | ||
| -webkit-user-select: none; | ||
| -webkit-touch-callout: none; | ||
| cursor: default; | ||
| } | ||
| * { | ||
| -webkit-tap-highlight-color: transparent; | ||
|
|
||
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.
[같이 수정되는 코드 함께 두기] 같은 세 줄(
user-select·-webkit-user-select·-webkit-touch-callout)이 이번 커밋에서RecommendedClubs.styles.ts의Tag에도 똑같이 들어갔고,WebviewGlobal.styles.ts·LongPressReorderItem.styles.ts에도 이미 있어요. 나중에-webkit-tap-highlight-color같은 속성을 하나 더 넣어야 할 때 한 곳만 고치고 나머지를 빠뜨리기 쉬워요.@/styles에noSelectOnLongPress같은 이름의css조각으로 빼서 같이 쓰는 걸 생각해 보면 좋겠어요.그리고 이 세 줄은 앱 웹뷰에서 길게 눌러도 링크가 선택되지 않게 하려는 거라, 코드만 봐서는 이유가 보이지 않아요. "본문 링크와 달리 메뉴 행은 길게 눌러도 선택되지 않게 한다" 정도로 한 줄 주석을 달아 두면, 나중에 누가
a선택 차단을 다시 손볼 때 왜 여기만 따로 막았는지 알 수 있어요. 지금 이 스타일은 웹뷰가 아닌 일반 웹에도 적용된다는 점도 같이 확인해 주세요.