-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
WebUI (file)table broken in current master #10162
Comments
One easy way to fix this is to add a click event handler to the input box which calls event.stopPropagation() first (prevents the th click handler from being called). And the tr click handler already returns false which is equivalent to calling e.preventDefault() which is fine I guess. edit: it's not just an easy fix, it is more correct than using the change event. The change event on a checkbox has the weird official definition to only fire if the checked stated changed and the checkbox loses focus. |
Ping @Piccirello. |
It has been a couple of months and this is still broken. Is @Piccirello the only one who can update #10153 so that its suitable for merging? He looks like he's had other commitments on his time lately. |
qBittorrent version and Operating System
master (2e5c09a)
If on linux, libtorrent and Qt version
libtorrent 1.1.11
qt 5.12.0
firefox 65
What is the problem
Clicking on the download checkbox of a file in the Content tab in the WebUI does nothing.
Analysis
Please use the firefox web developer inspector to verify this (and also during development to avoid committing such bugs):
The checkbox has a change event:
<input type="checkbox" id="cbPrio0" data-id="0" class="DownloadedCB">
which is embedded in a
<tr>
.The
<tr>
has 2click
and 2contextmenu
events. This already is dubious.One of the event handlers executes this:
qBittorrent/src/webui/www/private/scripts/dynamicTable.js
Lines 686 to 687 in 2e5c09a
So when I click the checkbox, the tr-click handler stops the event first, so the checkbox changed handler is never called:
qBittorrent/src/webui/www/private/scripts/prop-files.js
Line 57 in 2e5c09a
qBittorrent/src/webui/www/private/scripts/prop-files.js
Line 27 in 2e5c09a
The text was updated successfully, but these errors were encountered: