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

fix The change event shouldn't be raised on an upload input if the value wasn't changed after setFilesToUpload `` (close #1844) #1979

Merged
merged 6 commits into from
Apr 12, 2019

Conversation

Farfurix
Copy link
Contributor

@Farfurix Farfurix commented Apr 4, 2019

#1844

Changes

  1. Fix the change event behavior.

Native change event behavior

Test page:

<html>
<head></head>
<body>
    <label for="upload">Choose a file:</label>

    <input type="file" multiple="true" id="upload">

    <script>
        var uploadInput = document.getElementById('upload');

        ['change', 'input']
            .forEach(function (event) {
                uploadInput.addEventListener(event, function (e) {
                    console.log(e.type);
                });
            });
    </script>
</body>
</html>

Result:

Single select:
// Windows 10

Step 1: Select `file-1.txt`.
// Chrome, Firefox: input, change; Edge: change; IE11: change, input;

Step 2: Select `file-1.txt`.
// Firefox: input, change; Chrome, Edge, IE11: no events


// Multiple select:

Step 1: Select `file-1.txt`, `file-2.txt`.
// [macOS Mojave, Windows 10] Chrome: input, change; [macOS Mojave] Safari: change

Step 2: Select `file-1.txt`, `file-2.txt`.
// [macOS Mojave, Windows 10] Chrome: no events; [macOS Mojave] Safari: no events

Step 3: Select `file-2.txt`, `file-1.txt`.
// [Windows 10] Chrome: no events; [macOS Mojave] Chrome: input, change;
// [macOS Mojave] Safari: change

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit 5aa7df3 have failed. See details.

@Farfurix
Copy link
Contributor Author

Farfurix commented Apr 4, 2019

@testcafe-build-bot retest

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit 5aa7df3 have failed. See details.

@Farfurix
Copy link
Contributor Author

Farfurix commented Apr 4, 2019

@testcafe-build-bot retest

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit 5aa7df3 have failed. See details.

@AndreyBelym AndreyBelym closed this Apr 8, 2019
@AndreyBelym AndreyBelym reopened this Apr 8, 2019
@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit 5aa7df3 have failed. See details.

@Farfurix Farfurix closed this Apr 9, 2019
@Farfurix Farfurix reopened this Apr 9, 2019
@Farfurix
Copy link
Contributor Author

Farfurix commented Apr 9, 2019

@testcafe-build-bot retest

@Farfurix Farfurix closed this Apr 9, 2019
@Farfurix Farfurix reopened this Apr 9, 2019
@AndreyBelym AndreyBelym closed this Apr 9, 2019
@AndreyBelym AndreyBelym reopened this Apr 9, 2019
@AndreyBelym AndreyBelym closed this Apr 9, 2019
@AndreyBelym AndreyBelym reopened this Apr 9, 2019
@Farfurix
Copy link
Contributor Author

Farfurix commented Apr 9, 2019

@AndreyBelym, thank you :)

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit de9ba88 have failed. See details.

@Farfurix
Copy link
Contributor Author

Farfurix commented Apr 9, 2019

@testcafe-build-bot retest

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit de9ba88 have failed. See details.

@testcafe-build-bot
Copy link
Collaborator

✅ Tests for the commit de9ba88 have passed. See details.

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit 0d058a1 have failed. See details.

@testcafe-build-bot
Copy link
Collaborator

✅ Tests for the commit c2f9752 have passed. See details.

@Farfurix Farfurix changed the title [WIP] fix The change event shouldn't be raised on an upload input if the value wasn't changed after setFilesToUpload `` (close #1844) fix The change event shouldn't be raised on an upload input if the value wasn't changed after setFilesToUpload `` (close #1844) Apr 11, 2019
@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit a961587 have failed. See details.

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit ad40c96 have failed. See details.

@Farfurix
Copy link
Contributor Author

@testcafe-build-bot retest

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit ad40c96 have failed. See details.

@Farfurix
Copy link
Contributor Author

@testcafe-build-bot retest

@testcafe-build-bot
Copy link
Collaborator

✅ Tests for the commit ad40c96 have passed. See details.

@Farfurix Farfurix merged commit 3a9e84a into DevExpress:master Apr 12, 2019
@Farfurix Farfurix deleted the i1844 branch April 12, 2019 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants