Closed midopooler closed 3 years ago
@sansyrox I didn't get what the issue is tryna say. Do we need some keyboard shortcuts so that it will work with input fields?. I was reading this to understand but I can't :(
@Zoheb, when you type anything in the input box, you need to click on submit button to submit. We need to make the enter button do this as well.
On Tue, 6 Jul 2021 at 5:14 PM, Zoheb Alli Khan @.***> wrote:
@sansyrox https://github.com/sansyrox I didn't get what the issue is tryna say. Do we need some keyboard shortcuts so that it will work with input fields?. I was reading this https://developer.mozilla.org/en-US/docs/Web/API/Keyboard/getLayoutMap to understand but I can't :(
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mexili/incogly/issues/97#issuecomment-874689922, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHEOIBUCXQDVTIKDOOQDWLLTWLUDNANCNFSM47MKNHIQ .
Ahh alright
Idk why I am facing this error. After surfing google a lot I found out that this a Babel
version problem. What should I do then? @sansyrox
not even this one
<Input
className="home_page__input_box"
placeholder="Enter unique ID or link"
value={roomId}
onChange={handleChange}
onKeyDown={handleKeyPress}
/>
<Button
className="home_page__join_button"
variant="contained"
onClick={joinRoom}
ref={handleKeyPress}
type="submit"
>
handleKeyPress
is being duplicated. You are using it as a ref as well as a callback, which is wrong.
const handleKeyPress = (e) => {
if (e.key === 'Enter') {
this.btn.click();
}
};
We don't use this
in functional components
Ahh, alright I fixed that thing and it's working now. @sansyrox Demo. Making a PR
Completed
Enter keystroke not mapped with the input fields.