Skip to content

Commit

Permalink
use component-specific delay value for room name input
Browse files Browse the repository at this point in the history
  • Loading branch information
akinwale committed Oct 4, 2023
1 parent 0a9d3e4 commit 574b648
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const CONST = {
OUT: 'out',
},
ARROW_HIDE_DELAY: 3000,
INPUT_FOCUS_DELAY: 600,

API_ATTACHMENT_VALIDATIONS: {
// 24 megabytes in bytes, this is limit set on servers, do not update without wider internal discussion
Expand Down
5 changes: 4 additions & 1 deletion src/pages/workspace/WorkspaceNewRoomPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,11 @@ function WorkspaceNewRoomPage(props) {
[translate],
);

// the delay to be used for delayed focus on the room name input field
const inputFocusDelay = 600;

const roomNameInputRef = useRef(null);
useDelayedInputFocus(roomNameInputRef, CONST.INPUT_FOCUS_DELAY);
useDelayedInputFocus(roomNameInputRef, inputFocusDelay);

return (
<FullPageNotFoundView
Expand Down

0 comments on commit 574b648

Please sign in to comment.