mexili / incogly

Incogly is a video conferencing app aimed to remove any implicit bias in an interview and easing the process of remote collaboration.
https://incogly.mexili.org/
GNU Affero General Public License v3.0
28 stars 30 forks source link

Enter keystroke not mapped with the inputfields. #97

Closed midopooler closed 3 years ago

midopooler commented 3 years ago

Enter keystroke not mapped with the input fields.

ZohebMOPO commented 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 :(

sansyrox commented 3 years ago

@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 .

ZohebMOPO commented 3 years ago

Ahh alright

ZohebMOPO commented 3 years ago

Error 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

ZohebMOPO commented 3 years ago

errr not even this one

ZohebMOPO commented 3 years ago

Code

sansyrox commented 3 years ago
<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

ZohebMOPO commented 3 years ago

Ahh, alright I fixed that thing and it's working now. @sansyrox Demo. Making a PR

sansyrox commented 3 years ago

Completed