You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have automated events enabled in our website mathesar.org.
I noticed that the anchor buttons don't seem to perform navigation on our site in UAE, where I'm currently residing. This is because the click events are prevented, and the navigation is assigned to a callback which happens only when the event is sent i.e when the image 'simple.gif' loads or if an error is thrown, both of which don't seem to be triggering the callback.
Do not return false as this would prevent the browser from doing it's default action.
Do not have the redirection logic in the callback. Infact, the entire callback function below is not required.
var callback = function () {
if (!sent && !element.hasAttribute("target"))
document.location = element.getAttribute("href");
sent = true;
};
The window.saAutomatedLink function would be called first and the analytics request would be sent (call for loading the simple.gif) before the browser handles the redirection.
The sites using auto-events don't really have to wait for the callback to be completed.
We have automated events enabled in our website mathesar.org.
I noticed that the anchor buttons don't seem to perform navigation on our site in UAE, where I'm currently residing. This is because the click events are prevented, and the navigation is assigned to a callback which happens only when the event is sent i.e when the image 'simple.gif' loads or if an error is thrown, both of which don't seem to be triggering the callback.Here's an issue in our repo with more details: mathesar-foundation/mathesar-website#127
Update:
Strike my initial reasoning, I went through the auto-events code and found this:
The anchor links in our site, had target attributes for _self.
This prevented the callback from being called, since they had a target attribute.
And since the onClick event returns false, chrome did not navigate to the href. Somehow, some versions of Firefox seemed to work.
The text was updated successfully, but these errors were encountered: