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

Element Send Keys for "<input type=file>" has to also send a change event. #1262

Merged
merged 1 commit into from
May 30, 2018

Conversation

whimboo
Copy link
Contributor

@whimboo whimboo commented May 30, 2018

As given by the HTML spec the <input type=file> element sends both the input and change event. The spec currently only requires to fire the input event.

https://html.spec.whatwg.org/#file-upload-state-(type=file):event-input-3
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file

Testcase: https://output.jsbin.com/vijukozuro/1

index.html Outdated
@@ -6145,7 +6145,8 @@ <h3><dfn>Element Send Keys</dfn></h3>
If <var>multiple</var> is <code>true</code>
<var>files</var> are be appended to <var>element</var>’s <a>selected files</a>.

<li><p><a>Fire</a> an <a><code>input</code></a> event.
<li><p><a>Fire</a> an <a><code>input</code></a> and
<a><code>change</code></a> event.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be OK, but I think it would be better to call out the ordering explicitly:

  1. Fire an input event on element.
  2. Fire a change event on element.

Or:

  1. Fire these events in order on element:
    1.1. input
    1.2. change

We should also change this to be specific about where to fire the element (note the use of element above).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made those changes.

@andreastt andreastt merged commit 0361945 into w3c:master May 30, 2018
@whimboo
Copy link
Contributor Author

whimboo commented May 30, 2018

I will take care of adding the test via https://bugzilla.mozilla.org/show_bug.cgi?id=1448792

@whimboo
Copy link
Contributor Author

whimboo commented Jun 4, 2018

@andreastt shouldn't we label that PR for level 2?

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jun 21, 2018
… event for <input type=file>. r=ato

Adds a wdspec test to ensure the latest WebDriver specification
changes for w3c/webdriver#1262.

MozReview-Commit-ID: CQqq8VjBobU

--HG--
extra : rebase_source : 6a0c2ed0e5a8dec746c85d67a71280de8011e9a6
xeonchen pushed a commit to xeonchen/gecko-cinnabar that referenced this pull request Jun 21, 2018
… event for <input type=file>. r=ato

Adds a wdspec test to ensure the latest WebDriver specification
changes for w3c/webdriver#1262.

MozReview-Commit-ID: CQqq8VjBobU
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 13, 2018
…put type=file>.

Adds a wdspec test to ensure the latest WebDriver specification
changes for w3c/webdriver#1262.

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1448792
gecko-commit: c26eb7edb08f6c7540a6f39d3dde16631a7a28a4
gecko-integration-branch: central
gecko-reviewers: ato
jgraham pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 13, 2018
…put type=file>.

Adds a wdspec test to ensure the latest WebDriver specification
changes for w3c/webdriver#1262.

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1448792
gecko-commit: c26eb7edb08f6c7540a6f39d3dde16631a7a28a4
gecko-integration-branch: central
gecko-reviewers: ato
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 3, 2019
… event for <input type=file>. r=ato

Adds a wdspec test to ensure the latest WebDriver specification
changes for w3c/webdriver#1262.

MozReview-Commit-ID: CQqq8VjBobU

UltraBlame original commit: c26eb7edb08f6c7540a6f39d3dde16631a7a28a4
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 3, 2019
… event for <input type=file>. r=ato

Adds a wdspec test to ensure the latest WebDriver specification
changes for w3c/webdriver#1262.

MozReview-Commit-ID: CQqq8VjBobU

UltraBlame original commit: c26eb7edb08f6c7540a6f39d3dde16631a7a28a4
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 3, 2019
… event for <input type=file>. r=ato

Adds a wdspec test to ensure the latest WebDriver specification
changes for w3c/webdriver#1262.

MozReview-Commit-ID: CQqq8VjBobU

UltraBlame original commit: c26eb7edb08f6c7540a6f39d3dde16631a7a28a4
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.

None yet

2 participants