Skip to content

Resets selection in textinput when its content is changed - #10015

Closed
sauravsc wants to merge 1 commit into
servo:masterfrom
sauravsc:pr2
Closed

sauravsc wants to merge 1 commit into
servo:masterfrom
sauravsc:pr2

Conversation

@sauravsc

Copy link
Copy Markdown
Contributor

Fixes #10005.


This change is Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 15, 2016
@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@jdm jdm assigned jdm and unassigned larsbergstrom Mar 15, 2016
@larsbergstrom

Copy link
Copy Markdown
Contributor

r? @jdm

@jdm

jdm commented Mar 15, 2016

Copy link
Copy Markdown
Member

This fix looks good. Can we add a test to tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/ that verifies the behaviour of selectionStart and selectionEnd after resetting the value of the input field containing a selection (using the specification as a guide)?

@jdm jdm added S-needs-tests New tests have been requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Mar 15, 2016
@sauravsc

Copy link
Copy Markdown
Contributor Author

@jdm Yes.

@paulrouget paulrouget changed the title Resets selection in textinput when it's content is changed Resets selection in textinput when its content is changed Mar 16, 2016
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 16, 2016
@jdm

jdm commented Mar 16, 2016

Copy link
Copy Markdown
Member

-S-awaiting-review +S-needs-code-changes -S-needs-tests


Reviewed 1 of 1 files at r1, 2 of 2 files at r2.
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/selection-after-content-change.html, line 11 [r2] (raw file):
Let's assert the correct values of selectionStart and selectionEnd here.


tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/selection-after-content-change.html, line 12 [r2] (raw file):
Let's use a non-empty value, then assert that selectionStart and selectionEnd are both set to the end of the string.


Comments from the review on Reviewable.io

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. S-needs-rebase There are merge conflict errors. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-tests New tests have been requested by a reviewer. labels Mar 16, 2016
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Mar 16, 2016
@sauravsc

Copy link
Copy Markdown
Contributor Author

@jdm I've made the change.

@jdm

jdm commented Mar 16, 2016

Copy link
Copy Markdown
Member

@bors-servo: r+
Thanks!


Reviewed 1 of 1 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from the review on Reviewable.io

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit d8365ba has been approved by jdm

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. labels Mar 16, 2016
@jdm

jdm commented Mar 16, 2016

Copy link
Copy Markdown
Member

@bors-servo: r-
Sorry, needs to be rebased first.

@jdm jdm added S-needs-rebase There are merge conflict errors. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Mar 16, 2016
@sauravsc sauravsc closed this Mar 16, 2016
@sauravsc
sauravsc deleted the pr2 branch March 16, 2016 16:47
@jdm

jdm commented Mar 16, 2016

Copy link
Copy Markdown
Member

For the record, there's no need to close the PR and delete the branch. You can rebase the branch on top of the latest changes from the master branch and force push the result.

@sauravsc

Copy link
Copy Markdown
Contributor Author

@jdm Sorry about this, but I wasn't able to resolve rebase conflicts in my fork. I've opened a new PR with the same commit #10035.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-needs-rebase There are merge conflict errors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants