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

Add validity state check for WebDriver:ElementClear. #9161

Merged
merged 1 commit into from Jan 23, 2018

Conversation

Projects
None yet
2 participants
@jgraham
Copy link
Contributor

jgraham commented Jan 23, 2018

This patch checks that the element satisfies its form control
constraints, as well as being empty, before deciding not to clear
the element. This will make it possible to clear elements that
have invalid input.

The "clear a resettable element" algorithm is missing a check of
the element's ValidityState. WebDriver:ElementClear has
a subtle bug that only manifests in Gecko because Blink rejects
invalid key input to validation fields such as ,
but Gecko does not.

The value property of will not be updated unless
the input is actually valid, which means the first step of the algorithm
will pass irregardless of whether the user has actually modified it.

MozReview-Commit-ID: C2M3Fl1iKx6

Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1430575 [ci skip]


This change is Reviewable

Add validity state check for WebDriver:ElementClear.
This patch checks that the element satisfies its form control
constraints, as well as being empty, before deciding not to clear
the element.  This will make it possible to clear elements that
have invalid input.

The "clear a resettable element" algorithm is missing a check of
the <input> element's ValidityState.  WebDriver:ElementClear has
a subtle bug that only manifests in Gecko because Blink rejects
invalid key input to validation fields such as <input type=number>,
but Gecko does not.

The value property of <input type=number> will not be updated unless
the input is actually valid, which means the first step of the algorithm
will pass irregardless of whether the user has actually modified it.

MozReview-Commit-ID: C2M3Fl1iKx6

Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1430575 [ci skip]
@jgraham

This comment has been minimized.

Copy link
Contributor Author

jgraham commented Jan 23, 2018

Code reviewed upstream.

@jgraham jgraham merged commit d88a850 into master Jan 23, 2018

@jgraham jgraham deleted the sync_1babdff141ece20e5b1bda7d25140d7b8106b3dc branch Jan 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.