You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Click Cmd+F (dialog is opened with help of FindInPath.openFindWindow())
Press X-button to close the dialog ( FindInPath.closeFindWindow())
Immediately after that press Cmd+F again
Actual result: dialog is not shown and it is not shown on all subsequent Cmd+F
Details on race condition:
on step 2 FindInPath.closeFindWindow() set this[hasOpened] = false
then closeFindWindow shedule move and return
on step 3 FindInPath.openFindWindow() start executing, it check that this[hasOpened] is false, schedule move of the dialog to the appropriate position and change this[hasOpened] = true
move promise scheduled by closeFindWindow exectutes and move dialog to invisible position
move promise scheduled by openFindWindow exectutes and move dialog to visible position
visibility is set to visible by timeout function from openFindWindow
then promise scheduled after move in closeFindWindow reset visibility to hidden
This way we have dailog element in appropriate position, but it is invisible and this[hasOpened] is true
The text was updated successfully, but these errors were encountered:
abarsov
changed the title
Find in path window is not opened after it was just closed (due to race condition)
Find in path dialog is not opened after it was just closed (due to race condition)
Sep 10, 2020
abarsov
changed the title
Find in path dialog is not opened after it was just closed (due to race condition)
Find in path dialog fails to open after it was just closed (due to race condition)
Sep 10, 2020
abarsov
changed the title
Find in path dialog fails to open after it was just closed (due to race condition)
Find in page dialog fails to open after it was just closed (due to race condition)
Sep 10, 2020
Steps to reproduce:
FindInPath.openFindWindow()
)FindInPath.closeFindWindow()
)Actual result: dialog is not shown and it is not shown on all subsequent Cmd+F
Details on race condition:
FindInPath.closeFindWindow()
setthis[hasOpened] = false
closeFindWindow
shedulemove
and returnFindInPath.openFindWindow()
start executing, it check thatthis[hasOpened]
is false, schedulemove
of the dialog to the appropriate position and changethis[hasOpened] = true
move
promise scheduled bycloseFindWindow
exectutes and move dialog to invisible positionmove
promise scheduled byopenFindWindow
exectutes and move dialog to visible positionvisible
by timeout function fromopenFindWindow
then
promise scheduled aftermove
incloseFindWindow
reset visibility tohidden
This way we have dailog element in appropriate position, but it is invisible and
this[hasOpened]
is trueThe text was updated successfully, but these errors were encountered: