We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ce02504 + e0bee61 commit fcffc8cCopy full SHA for fcffc8c
src/pushy/core.cljs
@@ -1,5 +1,6 @@
1
(ns pushy.core
2
- (:require [goog.events :as events]
+ (:require [goog.dom :as dom]
3
+ [goog.events :as events]
4
[clojure.string])
5
(:import goog.History
6
goog.history.Html5History
@@ -97,7 +98,7 @@
97
98
(swap! event-keys conj
99
(on-click
100
(fn [e]
- (when-let [el (some-> e .-target (.closest "a"))]
101
+ (when-let [el (some-> e .-target (dom/getAncestorByTagNameAndClass "a" nil nil))]
102
(let [uri (.parse Uri (.-href el))]
103
;; Proceed if `identity-fn` returns a value and
104
;; the user did not trigger the event via one of the
0 commit comments