|
Rank: Advanced Member Groups: Member
Joined: 7/14/2014 Posts: 52
|
Hello, We use the Capture feature of the WebView object and it works great under most circumstances. We managed to find an issue calling Capture when there is a popup window opened. For example, by clicking the "try it" button on this W3Schools test: https://www.w3schools.com/js/tryit.asp?filename=tryjs_alertIt causes a deadlock, which makes sense under the circumstances, since we call Capture every X amount of time in the background. My question is, is there an event that can be handled or a property to know the browser is currently showing a popup, or anything of the sort? Otherwise, is it something that could be fixed in a future version? Thanks a lot!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
This makes sense. What you can do is to handle the WebView's JSDialog event and return immediately if you are waiting for Capture to return. A more "correct" way of handling this would be to fail Capture if a message box is in progress. However this will need to be done on our end due to possible racing scenarios. We will implement that in our next build.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 7/14/2014 Posts: 52
|
Thanks a lot for the quick answer! For now we'll work around the issue with the JSDialog event. Looking forward to the next build.
Best regards.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
This is just to let you know that we have posted a new build (20.2.63) that should resolve this issue. You can download the new build from our download page. In the new build if a dialog is currently displayed, Capture will return null. So make sure you check the return value.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 7/14/2014 Posts: 52
|
Thanks for the quick update, I tested and it works perfectly for us. 🙂
Best regards.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Great. Thanks for confirming!
|
|
Rank: Advanced Member Groups: Member
Joined: 7/14/2014 Posts: 52
|
Hello,
We've stumbled upon a different fringe case this time around. We can reproduce the same deadlock if we try to open the print dialog (for example, right clicking an image and pressing Print) with the Capture event being called around the same time. As a note, this seems to reproduce more easily if you right click a few times before pressing print, weirdly enough. It can also happen only when pressing right click, after some time it seems to freeze as well.
Handling the JSDialog event doesn't seem to help. Can you confirm if you reproduce this issue and if a fix is possible?
Regards.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Thanks for the info. The print dialog is a system dialog and it does not go through JSDialog code path, but it does appear to satisfy the conditions that triggers the original deadlock, so we should be able to apply the same kind of short circuit logic (to fail Capture if a print dialog is in progress). We will look into this and reply again when we have an update.
|
|
Rank: Advanced Member Groups: Member
Joined: 7/14/2014 Posts: 52
|
Thanks! Looking forward to it.
|
|
Rank: Advanced Member Groups: Member
Joined: 7/14/2014 Posts: 52
|
Hello,
From what I can tell, version 20.3.63 fixes the issue (as well as another we had regarding opening certain links). Thanks a lot!
Regards.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Version 20.3.63 did fix an issue related to opening new link. However we did not officially close the print dialog dead lock issue yet. We are still working on this issue.
|
|
Rank: Advanced Member Groups: Member
Joined: 7/14/2014 Posts: 52
|
Alright, thanks for letting me know.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
This is just to let you know that we have posted a new build that should resolve this issue. You can download the new build from our download page.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 7/14/2014 Posts: 52
|
Thanks a lot, we've updated and we'll see how it goes.
Regards.
|
|