-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Rewrite Microsoft's KeyboardEvent tests. #1630
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
base: master
Are you sure you want to change the base?
Conversation
Critic review: https://critic.hoppipolla.co.uk/r/4028 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
@Ms2ger this is waiting on something? |
Yes, being reviewed. |
<p><input id="target" value=""></p> | ||
<ol class=instructions> | ||
<li>Click in the above textbox using mouse | ||
<li>Press and hold down '{CTRL}' key and then press '{ALT}' key on the keyboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds specific to MS products.
AltGraph on other platforms is represented by a key. Should we have a test that Left Ctrl, Right Alt actually produces Alt-Graph on windows; but doesn't produce Ctrl and Alt on as modifiers? (Chrome currently fails this but I plan on attempting to fix that one of these days)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firefox also fails. And I don't think that it makes sense to treat Ctrl and Alt are inactive in such case because except Europe keyboard layouts, AltGr isn't so major. For example, Asian web developers may want to use Ctrl+Alt+foo for a shortcut key because most users use their country's primary keyboard layout or US keyboard layout.
So, from a point of view of compatibility with existing browsers, Ctrl + Alt on Windows should activate all of Alt, Control and AltGraph.
}); | ||
}); | ||
</script> | ||
<p>KeyboardEvent Object Property key holds the key value of the key pressed</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test seems redundant with https://github.com/w3c/web-platform-tests/blob/master/uievents/keyboard/key-manual.js
|
||
window.onload = this.step_func(function() { | ||
var target = document.getElementById("target"); | ||
target.addEventListener(event, this.step_func(function test_event(e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably location should be checked in https://github.com/w3c/web-platform-tests/blob/master/uievents/keyboard/key-manual.js and then this would be redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drive-by review..
No description provided.