JavaScript alerts are shown as system windows

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
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
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.
To see the attached files, you need to log into the forum.

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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
To see the attached files, you need to log into the forum.

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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