mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
chore(deps): upgrade react to 19.2.7 and react types to 19.x (#1154)
Bump react and react-dom 19.1.2 -> 19.2.7 and @types/react and @types/react-dom from v18 to v19. Keeps babel-plugin-react-compiler, which is a separate build-time tool, not part of the React 19 runtime. The @types v19 upgrade surfaced 21 type-only errors, all fixed without runtime behavior changes: - useRef<T>() now requires an explicit argument: pass undefined - DOM element refs are RefObject<T | null>: widen PostFormFields and AdvancedSettings ref prop types accordingly - retype reply-modal onInput handler to FormEvent + currentTarget - add a null guard for the boards-bar search input - update test mocks for stricter cloneElement/forwardRef typings Verified: type-check, lint, 1051 tests, and build pass; react-doctor score unchanged at 54; browser smoke across Chromium/Firefox/WebKit plus mobile viewport clean.
This commit is contained in:
@@ -358,9 +358,9 @@ const ReplyModal = ({ closeModal, showReplyModal, parentCid, parentNumber, threa
|
||||
}
|
||||
}, [showReplyModal]);
|
||||
|
||||
const handleContentInput = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
|
||||
lastSelectionStartRef.current = e.target.selectionStart ?? e.target.value.length;
|
||||
lastSelectionEndRef.current = e.target.selectionEnd ?? lastSelectionStartRef.current;
|
||||
const handleContentInput = (e: React.FormEvent<HTMLTextAreaElement>) => {
|
||||
lastSelectionStartRef.current = e.currentTarget.selectionStart ?? e.currentTarget.value.length;
|
||||
lastSelectionEndRef.current = e.currentTarget.selectionEnd ?? lastSelectionStartRef.current;
|
||||
};
|
||||
|
||||
const handleContentValueChange = (content: string, selectionStart?: number, selectionEnd?: number, options = optionsRef.current?.value || '') => {
|
||||
|
||||
Reference in New Issue
Block a user