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

A blur event raises too late when an input became hidden in IE #1275

Closed
AlexanderMoskovkin opened this issue Feb 28, 2017 · 1 comment
Closed
Assignees
Labels
AREA: client BROWSER: IE11 STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@AlexanderMoskovkin
Copy link
Contributor

Are you requesting a feature or reporting a bug?

bug

Provide the test code and the tested page URL (if applicable)

It's reproduced on DevExpress Bootstrap GridView internal pages.

I've create a simple example to demonstrate the problem

Tested page:

<input id="input1"/>
<input id="input2"/>

<script>
    var input1 = document.getElementById('input1');
    var input2 = document.getElementById('input2');

    input1.addEventListener('keydown', function (e) {
        if (e.key.toLowerCase() === 'tab') {
            input1.style.display = 'none';

            window.setTimeout(function () {
                input2.focus();
            });
        }
    });

    input1.addEventListener('blur', function (e) {
        if (e.srcElement.tagName && e.srcElement.tagName.toLowerCase() === 'input') {
            // document.activeElement should be `input1` now but it's `input2` in IE now
            document.activeElement.blur();
        }
    });

</script>

Test code

await t
        .click('#input1')
        .pressKey('tab')
        .expect(Selector('#input2').focused).ok();

Specify your

  • testcafe version: 0.13.0
@lock
Copy link

lock bot commented Mar 29, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 29, 2019
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this issue Dec 18, 2019
…1276)

* Fix native blur event preventing (fixes DevExpress#1275)

* Update the test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AREA: client BROWSER: IE11 STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

1 participant