Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start() fires on wrong elements #230

Closed
FoHoOV opened this issue May 30, 2021 · 3 comments
Closed

start() fires on wrong elements #230

FoHoOV opened this issue May 30, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@FoHoOV
Copy link

FoHoOV commented May 30, 2021

after the new API in version 10.0.4 I tried to achieve the same old problem on comment #83 and since trigger doesn't work the same way my solution was:

                            trigger: () => {
                                return true;
                            },
                            events: {
                                input: {
                                    focus: (event) => {
                                        _auto.start();
                                    },
                                },
                            }

_auto is the object instantiated via calling new autoComplete and is local to every input I'm setting it to (its inside forEach).

the problem is that I have multiple inputs that require the great lib that you have created(thank you!), and when I focus on any of them the first input's 'autoComplete_list_N' gets opened not the one bound to it.

if I log the event object after clicking on only ONE input I get the following output:

FocusEvent {isTrusted: true, relatedTarget: null, view: Window, detail: 0, sourceCapabilities: null, …}
FocusEvent {isTrusted: true, relatedTarget: input#code-name, view: Window, detail: 0, sourceCapabilities: InputDeviceCapabilities, …}

which is weird because only one FocusEvent should be fired.

btw you forgot to close a tag(strong) on your demo at playground on strong tag at element section ->

info.innerHTML = Found ${data.matches.length} matching results for "${data.query}"</strong;

@FoHoOV FoHoOV added the bug Something isn't working label May 30, 2021
@TarekRaafat
Copy link
Owner

Hello @FoHoOV,

Thanks a lot for reporting these issues.

I'll check the event issue today and get back to you ASAP.

Cheers, and have a good day! :)

@TarekRaafat
Copy link
Owner

The issue has been resolved in v10.1.1, please check it and let me know how it goes.

@FoHoOV
Copy link
Author

FoHoOV commented Jun 1, 2021

@TarekRaafat thank you the issue is resolved. thank you for your great work!

@FoHoOV FoHoOV closed this as completed Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants