JavaScript alerts are shown as system windows

Things you’d like to miss in the future...
Post Reply
John_C
Posts: 336
Joined: 16 May 2018 20:04

JavaScript alerts are shown as system windows

Post 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
alert.png (13.74 KiB) Viewed 941 times
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.

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: JavaScript alerts are shown as system windows

Post 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.

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: JavaScript alerts are shown as system windows

Post 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
settings_and_behavior.png (39.33 KiB) Viewed 892 times

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: JavaScript alerts are shown as system windows

Post by admin »

Ah, you disabled it under "Text Files". But the crucial entry for HTML preview is under "Web Files".

Post Reply