-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Playing audio will stop loading page and JS execution #1379
Comments
Manual clicks have the same effect |
I have not found the dictionary with the link provided above |
try this Load more dictionaries (dozens) and it's easier to click on |
QWebEngineView does not has the urlClick signal . The gd-ng has used the following trick to simulate a url click event.
The possible issue here is that ,
add the following line to gd-custom.js?
|
checked. Not this reason. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Guess: for a normal webview like chrome. when click the anchor link in the page ,the page will try to load the anchor url in this webview which also stop the previous normal loading. Need find a solution to prevent this default action. I tested the QWebEngineUrlRequestInterceptor and acceptNavigationRequest , the anchor's url has already been catched ,and blocked too. |
Describe the bug
My dict (see below) uses javascript to
.click()
to play audio, but it will stop loading all following pages/dicts. (seems unrelated toclick
itself, as clicking on a random element is ok, only playing audio has the problem.)A workaround to this is to listen on
DOMContentLoaded
event to wait page loading finished, but that takes too long to wait long webpages like wikipedia/wiktionary (almost 5 seconds). (this seems to be the built-in audio playing logic, which plays audio after everything has loaded).To Reproduce
Steps to reproduce the behavior:
document.querySelector(".pf a.visible")?.click()
Affected Dictionaries
The Little Dict
(downloaded from here), then modified thefy.js
that only containes:document.querySelector(".pf a")?.click()
Expected behavior
The audio played and page continues loading.
Screenshots
Enable js audio play:
Disable js audio play:
OS and software versions
Goldendict-ng 24.01.22-LoongYear.20240122.3dddb3be
Qt 6.6.1 Visual C++ Compiler 192930153 windows winnt 10.0.22631 x86_64-little_endian-llp64
Flags:USE_XAPIAN MAKE_ZIM_SUPPORT USE_ICONV MAKE_CHINESE_CONVERSION_SUPPORT no_ffmpeg_player
The text was updated successfully, but these errors were encountered: