File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed
packages/playwright-core/src/server/injected/recorder Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -492,9 +492,10 @@ class RecordActionTool implements RecorderTool {
492
492
return ;
493
493
const result = activeElement ? this . _recorder . injectedScript . generateSelector ( activeElement , { testIdAttributeName : this . _recorder . state . testIdAttributeName } ) : null ;
494
494
this . _activeModel = result && result . selector ? result : null ;
495
- if ( userGesture )
495
+ if ( userGesture ) {
496
496
this . _hoveredElement = activeElement as HTMLElement | null ;
497
- this . _updateModelForHoveredElement ( ) ;
497
+ this . _updateModelForHoveredElement ( ) ;
498
+ }
498
499
}
499
500
500
501
private _shouldIgnoreMouseEvent ( event : MouseEvent ) : boolean {
@@ -589,6 +590,8 @@ class RecordActionTool implements RecorderTool {
589
590
}
590
591
591
592
private _updateModelForHoveredElement ( ) {
593
+ if ( this . _performingActions . size )
594
+ return ;
592
595
if ( ! this . _hoveredElement || ! this . _hoveredElement . isConnected ) {
593
596
this . _hoveredModel = null ;
594
597
this . _hoveredElement = null ;
Original file line number Diff line number Diff line change @@ -402,17 +402,6 @@ await page1.GotoAsync("about:blank?foo");`);
402
402
await expect . poll ( ( ) => messages ) . toEqual ( [ 'mousedown' , 'mouseup' , 'click' ] ) ;
403
403
} ) ;
404
404
405
- test ( 'should update hover model on action' , async ( { openRecorder } ) => {
406
- const { page, recorder } = await openRecorder ( ) ;
407
-
408
- await recorder . setContentAndWait ( `<input id="checkbox" type="checkbox" name="accept" onchange="checkbox.name='updated'"></input>` ) ;
409
- const [ models ] = await Promise . all ( [
410
- recorder . waitForActionPerformed ( ) ,
411
- page . click ( 'input' )
412
- ] ) ;
413
- expect ( models . hovered ) . toBe ( '#checkbox' ) ;
414
- } ) ;
415
-
416
405
test ( 'should reset hover model on action when element detaches' , async ( { openRecorder } ) => {
417
406
const { page, recorder } = await openRecorder ( ) ;
418
407
You can’t perform that action at this time.
0 commit comments