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

strange setTimeout #2070

Open
ralonsoreyes opened this issue Jul 5, 2021 · 1 comment
Open

strange setTimeout #2070

ralonsoreyes opened this issue Jul 5, 2021 · 1 comment
Labels

Comments

@ralonsoreyes
Copy link

Hi, I have found a strange behaviour in the library w2ui-1.5.js

Line:8560
code:

setTimeout(function () {
    if (['INPUT', 'TEXTAREA', 'SELECT'].indexOf(target.tagName.toUpperCase()) != -1) {
        $(target).focus();
    } else {
        if (!$input.is(':focus')) $input.focus();
    }
}, 50);

This code creates a strange effect on my components.
I have a w2grid inside another control and when I use the scroll and then click on a w2grid, all w2grid control disappears ... if I click again on the blank space that leaves the previous effect ... the control appears again.

My workaround to avoid this is comment this setTimeout function.

I do not know if I will have other side effects when commenting on this function.

Could you solve it?

@mpf82 mpf82 added the Question label Jul 5, 2021
@vitmalina
Copy link
Owner

Not sure what is going on. Is the a way you can replicate it in a jsFiddle? What might be happening is some other element gets focus and it causes grid container to scroll, therefore it disappears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants