FIX: full page search results are unclickable

FIX: full page search results are unclickable

data-ember-action can have empty value in favor of data-ember-action-ID attribute

diff --git a/app/assets/javascripts/discourse/lib/intercept-click.js.es6 b/app/assets/javascripts/discourse/lib/intercept-click.js.es6
index 9d115ff..c4daa17 100644
--- a/app/assets/javascripts/discourse/lib/intercept-click.js.es6
+++ b/app/assets/javascripts/discourse/lib/intercept-click.js.es6
@@ -27,7 +27,7 @@ export default function interceptClick(e) {
     !href ||
     href === "#" ||
     $currentTarget.attr("target") ||
-    $"ember-action") != null ||
+    $"ember-action") ||
     $"auto-route") != null ||
     $"share-url") != null ||
     $currentTarget.hasClass("widget-link") ||

GitHub sha: b7c501bf


This commit has been mentioned on Discourse Meta. There might be relevant details there:

Curious, when did this regress?

This is caused by the FIX: ensure ember transitions do not get hijacked by discourse interc… · discourse/discourse@09cbd08 · GitHub 6 hours ago.


@featheredtoast are we going to have similar issues with the other 2 params?

Most likely, I’ll go ahead and revert those too.

I’m a little confused between when to delegate to either routing layer (build-in ember vs discourse). I was following a path down the actions via the user-card-contents in which there is both an ember action and an href. The ember action here is an ember transition that goes to the proper page, but intercept-click also steals the routing as well there.

This still routes… ok but further down the line, we are unable to use ember’s replaceWith() method for replacing URLs if we’ve routed with the discourse routeTo methods. That’s what the fix before was doing - allowing the event to be handled by the ember action, which allows ember’s replaceWith to replace against an ember transition.

Better then would be to handle this in Discourse’s routing, and insert the same transition state that ember expects, but I have not unwraped how to do that exactly yet.

1 Like

This is already done as per the commit below