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 keypress trigger condition #24624

Merged
merged 1 commit into from Nov 14, 2019
Merged

Conversation

@garasubo
Copy link
Contributor

garasubo commented Nov 3, 2019

Fix #22346

keypress event should be triggered for keys representing character
values. So, we should trigger this event for enter key.
This event should not trigger for IME inputs.

TODO:

  • It seems we don't handle composition events correctly. To implement this keypress condition correctly, we should fix that first. In my current implementation, onkeypress event will be trigger when the user press Enter key to send inputs in IME (onCompotionEnd).
  • I don't update any tests, and I couldn't find any tests related to this change in WPT. It might be better to add some tests for it, but I don't know what is the appropriate way.

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #___ (GitHub issue number if applicable)
  • There are tests for these changes OR
  • These changes do not require tests because ___
keypress event should be triggered for keys representing character
values. So, we should trigger this event for enter key.
This event should not trigger for IME inputs.
@highfive
Copy link

highfive commented Nov 3, 2019

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @SimonSapin (or someone else) soon.

@highfive
Copy link

highfive commented Nov 3, 2019

Heads up! This PR modifies the following files:

@highfive
Copy link

highfive commented Nov 3, 2019

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@garasubo
Copy link
Contributor Author

garasubo commented Nov 8, 2019

@SimonSapin Could you review this PR? Also I'm not sure I should update the tests or not. What do you think?

@jdm
Copy link
Member

jdm commented Nov 12, 2019

@highfive highfive assigned paulrouget and unassigned SimonSapin Nov 12, 2019
@paulrouget
Copy link
Contributor

paulrouget commented Nov 13, 2019

It seems we don't handle composition events correctly. To implement this keypress condition correctly, we should fix that first. In my current implementation, onkeypress event will be trigger when the user press Enter key to send inputs in IME (onCompotionEnd).

Feel free to file a followup issue for that.

I don't update any tests, and I couldn't find any tests related to this change in WPT. It might be better to add some tests for it, but I don't know what is the appropriate way.

Let's see how happy the wpt tests are.

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Nov 13, 2019

Trying commit b30fc2d with merge 6667207...

bors-servo added a commit that referenced this pull request Nov 13, 2019
[WIP] Fix keypress trigger condition

Fix #22346

keypress event should be triggered for keys representing character
values. So, we should trigger this event for enter key.
This event should not trigger for IME inputs.

TODO:
- It seems we don't handle composition events correctly. To implement this keypress condition correctly, we should fix that first. In my current implementation, onkeypress event will be trigger when the user press Enter key to send inputs in IME (onCompotionEnd).
- I don't update any tests, and I couldn't find any tests related to this change in WPT. It might be better to add some tests for it, but I don't know what is the appropriate way.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 13, 2019

💔 Test failed - linux-rel-wpt

@garasubo
Copy link
Contributor Author

garasubo commented Nov 13, 2019

@paulrouget Thanks for reviewing. For IME issue, I opened #24724 . I'll update more after some investigation.

@paulrouget
Copy link
Contributor

paulrouget commented Nov 13, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Nov 13, 2019

📋 Looks like this PR is still in progress, ignoring approval

@paulrouget
Copy link
Contributor

paulrouget commented Nov 13, 2019

@garasubo is this ready to land? If so, remove the "WIP" part of the PR title.

@garasubo garasubo changed the title [WIP] Fix keypress trigger condition Fix keypress trigger condition Nov 13, 2019
@garasubo
Copy link
Contributor Author

garasubo commented Nov 13, 2019

@paulrouget Yes. It is ready if I don't have to update the tests.

@paulrouget
Copy link
Contributor

paulrouget commented Nov 14, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Nov 14, 2019

📌 Commit b30fc2d has been approved by paulrouget

@bors-servo
Copy link
Contributor

bors-servo commented Nov 14, 2019

Trying commit b30fc2d with merge f589410...

bors-servo added a commit that referenced this pull request Nov 14, 2019
Fix keypress trigger condition

Fix #22346

keypress event should be triggered for keys representing character
values. So, we should trigger this event for enter key.
This event should not trigger for IME inputs.

TODO:
- It seems we don't handle composition events correctly. To implement this keypress condition correctly, we should fix that first. In my current implementation, onkeypress event will be trigger when the user press Enter key to send inputs in IME (onCompotionEnd).
- I don't update any tests, and I couldn't find any tests related to this change in WPT. It might be better to add some tests for it, but I don't know what is the appropriate way.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 14, 2019

☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster
State: approved=paulrouget try=True

@bors-servo
Copy link
Contributor

bors-servo commented Nov 14, 2019

Testing commit b30fc2d with merge ca84df9...

bors-servo added a commit that referenced this pull request Nov 14, 2019
Fix keypress trigger condition

Fix #22346

keypress event should be triggered for keys representing character
values. So, we should trigger this event for enter key.
This event should not trigger for IME inputs.

TODO:
- It seems we don't handle composition events correctly. To implement this keypress condition correctly, we should fix that first. In my current implementation, onkeypress event will be trigger when the user press Enter key to send inputs in IME (onCompotionEnd).
- I don't update any tests, and I couldn't find any tests related to this change in WPT. It might be better to add some tests for it, but I don't know what is the appropriate way.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 14, 2019

💔 Test failed - status-taskcluster

@CYBAI
Copy link
Collaborator

CYBAI commented Nov 14, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Nov 14, 2019

💣 Failed to start rebuilding: 405 Not Allowed

@bors-servo
Copy link
Contributor

bors-servo commented Nov 14, 2019

Testing commit b30fc2d with merge f3b1f0d...

bors-servo added a commit that referenced this pull request Nov 14, 2019
Fix keypress trigger condition

Fix #22346

keypress event should be triggered for keys representing character
values. So, we should trigger this event for enter key.
This event should not trigger for IME inputs.

TODO:
- It seems we don't handle composition events correctly. To implement this keypress condition correctly, we should fix that first. In my current implementation, onkeypress event will be trigger when the user press Enter key to send inputs in IME (onCompotionEnd).
- I don't update any tests, and I couldn't find any tests related to this change in WPT. It might be better to add some tests for it, but I don't know what is the appropriate way.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 14, 2019

☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster
Approved by: paulrouget
Pushing f3b1f0d to master...

@bors-servo bors-servo merged commit b30fc2d into servo:master Nov 14, 2019
2 checks passed
2 checks passed
Taskcluster (pull_request) TaskGroup: success
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

7 participants
You can’t perform that action at this time.