GithubHelp home page GithubHelp logo

Comments (6)

twillis avatar twillis commented on September 2, 2024

ok, well I tried, but I'm not able to run lein test on the project. alas, here's a patch that describes what I was thinking.

--- a/src/cljs/enfocus/events.cljs
+++ b/src/cljs/enfocus/events.cljs
@@ -85,7 +85,7 @@
     (conj (get-node-chain top (.-parentNode node)) node)))

 (defn- create-event [type cur tar]
-  (let [event (goog.events.Event. type)]
+  (let [event (or (.init type tar) (goog.events.Event. type))]
     (set! (.-currentTarget event) cur)
     (set! (.-target event) tar)
     event))

from enfocus.

ckirkendall avatar ckirkendall commented on September 2, 2024

You need to have phantom JavaScript engine installed to run the tests.
Unfortunately, I am still concerting the event test over to new
structure. I think using goog.object to clone the original event and then
set the current target might be our best option.
On Dec 31, 2013 7:53 PM, "Tom Willis" [email protected] wrote:

ok, well I tried, but I'm not able to run lein test on the project. alas,
here's a patch that describes what I was thinking.

--- a/src/cljs/enfocus/events.cljs+++ b/src/cljs/enfocus/events.cljs@@ -85,7 +85,7 @@
(conj (get-node-chain top (.-parentNode node)) node)))

(defn- create-event [type cur tar]- (let [event (goog.events.Event. type)]+ (let [event (or (.init type tar) (goog.events.Event. type))](set! %28.-currentTarget event%29 cur)
(set! (.-target event) tar)
event))


Reply to this email directly or view it on GitHubhttps://github.com//issues/87#issuecomment-31416460
.

from enfocus.

ckirkendall avatar ckirkendall commented on September 2, 2024

I did some testing and ended up cloning the original event and setting the currentTarget to solve the issue.

from enfocus.

ckirkendall avatar ckirkendall commented on September 2, 2024

If you could can you pull down the newest 2.1.0-SNAPSHOT and validate it solves your issue.

from enfocus.

twillis avatar twillis commented on September 2, 2024

sure, i'll do that this evening, about to go get my hobbit on now :)

from enfocus.

twillis avatar twillis commented on September 2, 2024

just gave it a go and it works as expected. thanks so much for the change over the holidays.

from enfocus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.