-
Notifications
You must be signed in to change notification settings - Fork 327
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
[7.x] Keyboard Support Improvements #1053
Conversation
public function controlClick($selector = null) | ||
{ | ||
return $this->withKeyboard(function (Keyboard $keyboard) use ($selector) { | ||
$key = OperatingSystem::onMac() ? WebDriverKeys::META : WebDriverKeys::CONTROL; |
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.
I don't quite follow this part. On my macOS keyboard I have a control key and a "meta" / command key. Why do we use the meta key for Mac here if some Mac keyboards have an actual control key?
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.
COMMAND
and META
represent the same keystroke in Mac : https://github.com/php-webdriver/php-webdriver/blob/a1578689290055586f1ee51eaf0ec9d52895bb6d/lib/WebDriverKeys.php#L90
The primary issue here is that Windows uses Control+click while Mac uses Command+click to trigger open in new tab. Similar issue can occur for action combo such as copy text etc.
PR: laravel/dusk#1053 Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
PR: laravel/dusk#1053 Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
* [10.x] Dusk - Add Keyboard Support Improvements documentation PR: laravel/dusk#1053 Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> * wip Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> * wip Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> * formatting * formatting --------- Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> Co-authored-by: Taylor Otwell <taylor@laravel.com>
Before
After