Yeah, I just checked and it does seem like Splunk does this deliberately (so it appears it's not a mistake in the code). The paginator code stops event propagation, and since it is first to bind to click events, your code never runs since propagation beyond Splunks own handler is stopped.
However, it works if you use vanilla js to attach an event handler to the paginator and use the target of that click event which is the actual a . To print the clicked page to the browser console, it's basically
var paginator = document.querySelector("#panel4 .splunk-paginator");
paginator.addEventListener("click", function(e) {console.log(e.target.text);});
Beware that if you did not assign panel4 explicitly (in Simple XML), it might break if you edit the XML and add or remove a panel before panel 4. It might be a good idea to give the panel an explicit id like this
<panel id="paginator_panel">
<table ...
and use that id in js.
... View more