Closed jynnie closed 3 years ago
Hm, which version of Firefox do you have? I use Firefox 63 on Ubuntu, and I didn't see it crash, but I did see a spinnner that did not disappear like it should:
I'm using Firefox 63.0.3 on Mac. I also get the spinner, but once I click off or close the pop-up, it instantly crashes.
I also just updated to Firefox 64 to check if that fixed the issue, but it still crashes.
This is caused by invoking an invalid CSS selector due to the semicolon in the ToS;DR
service name concatenated in the query selector expressions used with jQuery in popup.js
I encounter this on the Chrome extension on this page: https://edit.tosdr.org/ It's likely the same issue with Firefox.
As an example: try to run this query selector command in plain JS in any page to observe the error.
document.querySelector('#popup-point-ToS;DR-4518')
// VM26:1 Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#popup-point-ToS;DR-4518' is not a valid selector.
// at <anonymous>:1:10
The getServiceDetails()
promise does not catch the error thrown by tosdrPoint()
, so the popup document remains stuck in the "loading" state.
Perhaps the serviceName
should be sanitized when generating the element ID & querying for it. Or maybe dropping the serviceName
altogether from the element ID if there's no real need for that distinction in the popup.html
. The dataPoint.id
should suffice to serve as a unique ID that's unique per service and services shown one at a time in the popup, right?
Fixed in 89e56898271bc1ec6404d46b12f100a9ca636e77
When I attempt to open the extension while on tosdr.org, Firefox crashes.