Skip to content

Commit

Permalink
Clear code
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasTy committed Mar 29, 2024
1 parent 6a5456c commit af008cf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ export const useFieldV6TextField: UseFieldTextField<false> = (params) => {
getActiveSectionIndexFromDOM: () => {
const browserStartIndex = inputRef.current!.selectionStart ?? 0;
const browserEndIndex = inputRef.current!.selectionEnd ?? 0;
if ((browserStartIndex === 0 && browserEndIndex === 0) || !!inputRef.current?.readOnly) {
const isInputReadOnly = !!inputRef.current?.readOnly;
if ((browserStartIndex === 0 && browserEndIndex === 0) || isInputReadOnly) {
return null;
}

Expand Down

0 comments on commit af008cf

Please sign in to comment.