Closed Bug 293741 Opened 20 years ago Closed 20 years ago

Calling DOMParser.parseFromString causes menus to be dismissed

Categories

(Core :: XML, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 254894

People

(Reporter: jdperlow, Unassigned)

References

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 A simple call to DOMParser.parseFromString will cause an active menu to get dismissed. This is particularly a bad bug for an application that processes XML using XMLHTTP requests in the background because it interferes with teh UI. Reproducible: Always Steps to Reproduce: 1. Here's a simple page that will repro the problem: <html> <body onload="onLoad()"> <script> function onLoad() { parseXml("<foo></foo>"); setTimeout(onLoad, 1500); } function parseXml(xml) { /var parser = new DOMParser(); var xmlDoc = parser.parseFromString(xml, "text/xml"); return xmlDoc; } </script> </body> </html> 2. Right click on the page. Actual Results: The menu will get dismissed momentarily. Expected Results: The parsing shouldn't interfere with the menu. Other XML methods may do this as well (serializeToString?). I'd expect no XML methods should affect the UI as they are completely unrelated to the UI. There is some suspicious code in parseFromStream that messes with the event queue. This is probably the culprit. It not only affects the current page but any other tab or browser window. In essence a page can create a minor DOS attack using this.
You mean the menu closes? Then this would be equivalent to bug 254894.
Depends on: 254894
*** This bug has been marked as a duplicate of 254894 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.