File tree Expand file tree Collapse file tree 2 files changed +32
-8
lines changed
packages/selenium-ide/src/content Expand file tree Collapse file tree 2 files changed +32
-8
lines changed Original file line number Diff line number Diff line change @@ -534,8 +534,7 @@ Recorder.addEventHandler(
534
534
let nowNode = 0 ,
535
535
mouseoverLocator ,
536
536
nodeInsertedLocator ,
537
- nodeAttrChange ,
538
- nodeAttrChangeTimeout
537
+ nodeInsertedAttrChange
539
538
Recorder . addEventHandler (
540
539
'mouseOver' ,
541
540
'mouseover' ,
@@ -546,14 +545,11 @@ Recorder.addEventHandler(
546
545
let clickable = findClickableElement ( event . target )
547
546
if ( clickable ) {
548
547
nodeInsertedLocator = event . target
548
+ nodeInsertedAttrChange = locatorBuilders . buildAll ( event . target )
549
549
setTimeout ( ( ) => {
550
550
nodeInsertedLocator = undefined
551
+ nodeInsertedAttrChange = undefined
551
552
} , 500 )
552
-
553
- nodeAttrChange = locatorBuilders . buildAll ( event . target )
554
- nodeAttrChangeTimeout = setTimeout ( ( ) => {
555
- nodeAttrChange = undefined
556
- } , 10 )
557
553
}
558
554
//drop target overlapping
559
555
if ( mouseoverQ ) {
@@ -629,9 +625,10 @@ Recorder.addMutationObserver(
629
625
nodeInsertedLocator = undefined
630
626
}
631
627
if ( nodeInsertedLocator ) {
632
- record ( 'mouseOver' , locatorBuilders . buildAll ( nodeInsertedLocator ) , '' )
628
+ record ( 'mouseOver' , nodeInsertedAttrChange , '' )
633
629
mouseoutLocator = nodeInsertedLocator
634
630
nodeInsertedLocator = undefined
631
+ nodeInsertedAttrChange = undefined
635
632
mouseoverLocator = undefined
636
633
}
637
634
}
Original file line number Diff line number Diff line change
1
+ < div id ="cont " style ="background: blue;width: 500px;height: 500px; " onclick ="javascript:void(0) ">
2
+ </ div >
3
+
4
+ < script >
5
+ const cont = document . getElementById ( 'cont' )
6
+ const btn = document . createElement ( 'button' )
7
+ btn . innerText = 'click me'
8
+ let hasChild = false
9
+ document . body . addEventListener ( 'mousemove' , ( ) => {
10
+ } )
11
+ cont . addEventListener ( 'mouseover' , ( ) => {
12
+ console . log ( 'over' )
13
+ if ( ! hasChild ) {
14
+ cont . className = 'kaki'
15
+ cont . appendChild ( btn )
16
+ hasChild = true
17
+ }
18
+ } )
19
+ cont . addEventListener ( 'mouseout' , ( ) => {
20
+ console . log ( 'out' )
21
+ if ( hasChild ) {
22
+ cont . className = ''
23
+ cont . removeChild ( btn )
24
+ hasChild = false
25
+ }
26
+ } )
27
+ </ script >
You can’t perform that action at this time.
0 commit comments