mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(ui): polish advanced settings, media hosting warning, reply modal mobile UX (#1054)
- Move Save Advanced Settings button to bottom-center of advanced settings - Reduce spacing above/below web upload warning in media hosting - Set 16px font for reply modal inputs on mobile (prevents iOS zoom) - Autofocus textarea when opening reply modal on mobile
This commit is contained in:
@@ -141,6 +141,10 @@
|
||||
.title {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.container input[type="text"], .container textarea {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.error {
|
||||
|
||||
@@ -152,23 +152,25 @@ const ReplyModal = ({ closeModal, showReplyModal, parentCid, parentNumber, threa
|
||||
}, [parentCid]);
|
||||
|
||||
useEffect(() => {
|
||||
if (showReplyModal && !isMobile) {
|
||||
if (showReplyModal) {
|
||||
setTimeout(() => {
|
||||
if (textRef.current) {
|
||||
textRef.current.focus();
|
||||
}
|
||||
}, 0);
|
||||
|
||||
const handleEscape = (e: KeyboardEvent) => {
|
||||
if (e.key === 'Escape') {
|
||||
closeModal();
|
||||
}
|
||||
};
|
||||
document.addEventListener('keydown', handleEscape);
|
||||
if (!isMobile) {
|
||||
const handleEscape = (e: KeyboardEvent) => {
|
||||
if (e.key === 'Escape') {
|
||||
closeModal();
|
||||
}
|
||||
};
|
||||
document.addEventListener('keydown', handleEscape);
|
||||
|
||||
return () => {
|
||||
document.removeEventListener('keydown', handleEscape);
|
||||
};
|
||||
return () => {
|
||||
document.removeEventListener('keydown', handleEscape);
|
||||
};
|
||||
}
|
||||
}
|
||||
}, [showReplyModal, closeModal, isMobile]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user