Page 1 of 1

JavaScript alerts are shown as system windows

Posted: 09 Jul 2019 19:50
by John_C
Happened today: I have created html with a simple JS section. During a very short work with it (open in Notepad, do some edits, then open in browser) I got an coccinellidae window (CW for short):

Code: Select all

Error -2147024726

Error:      -2147024726 (0x800700AA)
Desc:       Automation error
The requested resource is in use. 
Dll:        0
Proc:       ShowInBrowser: C:\Users\Name\Desktop\dir\file.html

Source:     XYplorer
XY ver:     XYplorer 20.20.0000
OS:         Windows 7 Ultimate, 32-bit, Build 7600
Locale:     1033 (en-US)
ANSI:       1252, ACP: 1252  (ANSI - Latin I)
Font:       Segoe UI 9, DBCS: No
DPI:        96 (100%), 1600x900

Date:       2019-07-09 19:41:42
It seems that this CW is a result of another thing:

As I discovered, the JS alert(something); is pop-upped when you select such file in XYplorer.

1. Crete a simple html file with a single line: <script>alert("foo");</script>.
2. Ensure that you have *.html disabled in Tools > Configuration > Previewed Formats.
3. Enable Preview Pane (Ctrl-F11)
4. Select this file in XYplorer.
5. Notice the alert message shown as system window.
alert.png
Probably the JS must be completely disabled in such cases? Just a shallow opinion.

Edit: Now I can reproduce the initial CW:

1. Create blank file.txt and open it in any text editor. Do not close text editor.
2. Select the html file as described above. Do not close the "alert" window.
3. Switch to your text editor, do some changes in opened file.txt, press Ctrl-S to save it.
4. Done: CW was reproduced.

Re: JavaScript alerts are shown as system windows

Posted: 09 Jul 2019 21:09
by admin
Ensure that you have *.html disabled in Tools > Configuration > Previewed Formats.
disabled ??? sure?

PS: whatever, the error won't come again in next beta.

Re: JavaScript alerts are shown as system windows

Posted: 10 Jul 2019 10:55
by John_C
admin wrote: ↑09 Jul 2019 21:09 disabled ??? sure?
Yes. Tested with XYplorer 20.20:

Code: Select all

<script>alert('foo');</script>
<style>p {color: red;}</style>
<p>this is a test</p>
settings_and_behavior.png

Re: JavaScript alerts are shown as system windows

Posted: 10 Jul 2019 12:17
by admin
Ah, you disabled it under "Text Files". But the crucial entry for HTML preview is under "Web Files".