TheME
April 9, 2020, 9:49pm
1
Please follow the below template, it will help us to help you!
Please ensure that you are running the latest version of the beta code.
Run pihole -up to update to the latest, then verify that the problem still exists before reporting it.
✓ done
Problem with Beta 5.0:
Following the link on the query log's column Status
to jump to the matching regex rule should open up just one new browser's tab.
But sometimes it opens up multipe tabs - at PC and smart phone.
According to the browser's development tools the click-event is added multiple times:
It seems this happens only if the table’s filtering is used.
But I have not yet looked deeper into the causing code.
Debug Token:
-
DL6ER
April 10, 2020, 7:48am
3
It's only added once in the rowCallback
, but we'll make sure to check this. Thanks for your report!
edit I see, the link is always added when the rowCallback
is called. If you filter on a given domain/client it may be called multiple times.
pi-hole:release/v5.0
← pi-hole:fix/regex_link_multiple_tabs
opened 08:48AM - 10 Apr 20 UTC
**By submitting this pull request, I confirm the following:**
- [X] I have r… ead and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md), as well as this entire template.
- [X] I have made only one major change in my proposed changes.
- [X] I have commented my proposed changes within the code.
- [X] I have tested my proposed changes, and have included unit tests where possible.
- [X] I am willing to help maintain this change if there are issues with it later.
- [X] I give this submission freely and claim no ownership.
- [X] It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
- [X] I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
---
**What does this PR aim to accomplish?:**
Prevent multiple tabs from being opened when clicking on a regex link on the Query Log page.
This bug has been reported on Discourse.
**How does this PR accomplish the above?:**
Release possible previous onClick event handler on regex links before assigning new ones.
**What documentation changes (if any) are needed to support this PR?:**
None