mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Set proper button value in WebDriver - ElementClick command (#36871)
Fix ElementClick: `ElementClick` should use `MouseButton::Left` to create `action`. Testing: No pass test now. Tests still fail because of other issues. For: https://github.com/servo/servo/issues/36658 cc: @xiaochengh , @yezhizhen , @PotatoCP Signed-off-by: batu_hoang <longvatrong111@gmail.com>
This commit is contained in:
parent
eaf9224799
commit
b2e51820e4
3 changed files with 20 additions and 18 deletions
|
@ -305,11 +305,10 @@ impl Handler {
|
|||
},
|
||||
});
|
||||
|
||||
let button = (action.button as u16).into();
|
||||
let cmd_msg = WebDriverCommandMsg::MouseButtonAction(
|
||||
session.webview_id,
|
||||
MouseButtonAction::Down,
|
||||
button,
|
||||
action.button.into(),
|
||||
pointer_input_state.x as f32,
|
||||
pointer_input_state.y as f32,
|
||||
);
|
||||
|
@ -351,11 +350,10 @@ impl Handler {
|
|||
},
|
||||
});
|
||||
|
||||
let button = (action.button as u16).into();
|
||||
let cmd_msg = WebDriverCommandMsg::MouseButtonAction(
|
||||
session.webview_id,
|
||||
MouseButtonAction::Up,
|
||||
button,
|
||||
action.button.into(),
|
||||
pointer_input_state.x as f32,
|
||||
pointer_input_state.y as f32,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue