This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-21
Channels
- # adventofcode (82)
- # bangalore-clj (1)
- # beginners (44)
- # boot (7)
- # boot-dev (25)
- # cider (1)
- # cljs-dev (3)
- # cljsrn (14)
- # clojars (11)
- # clojure (210)
- # clojure-dusseldorf (4)
- # clojure-gamedev (2)
- # clojure-greece (11)
- # clojure-italy (6)
- # clojure-norway (6)
- # clojure-russia (6)
- # clojure-serbia (2)
- # clojure-spec (43)
- # clojure-sweden (1)
- # clojure-uk (77)
- # clojurescript (43)
- # cursive (1)
- # data-science (3)
- # datomic (32)
- # duct (3)
- # figwheel (2)
- # fulcro (71)
- # graphql (3)
- # hoplon (14)
- # jobs-discuss (3)
- # lambdaisland (1)
- # leiningen (2)
- # luminus (2)
- # lumo (14)
- # off-topic (16)
- # om-next (1)
- # perun (5)
- # random (1)
- # re-frame (19)
- # reagent (37)
- # ring-swagger (3)
- # shadow-cljs (157)
- # specter (6)
- # sql (29)
- # unrepl (14)
does anyone know of something in hoplon that changes the way that NodeList
works?
(defn- set-insertBefore!
[this kidfn]
(set! (.-insertBefore this)
(fn [x y]
(this-as this
(with-let [x x]
(ensure-kids! this)
(cond
(not y) (swap! (kidfn this) conj x)
(not= x y) (swap! (kidfn this) #(vec (mapcat (fn [z] (if (= z y) [x z] [z])) %)))))))))
this looks suspicious, and probably is breaking the editor
@micha @alandipert could i get a little help/advice on this?
i think that https://github.com/ckeditor/ckeditor5-utils/blob/7dab8907b37764bc1a477f07c7e30e8bad6fe836/src/dom/insertat.js#L17 is being broken by https://github.com/hoplon/hoplon/blob/master/src/hoplon/core.cljs#L211
i might be getting a bit beyond my understanding of hoplon internals here
why do we need to override low level fns like insertBefore
? and why not wrap default functionality instead of replacing it?
looks like set-appendChild!
has explicit handling for native?
elements with a fallback to the native fn, but removeChild
, insertBefore
, replaceChild
, setAttribute
have no native element handling
and setAttribute
is not added to the prototype, but the others are
thedavidmeister it sounds likely to me, your theory that the patched nodes are the problem
thedavidmeister are you passing an element you created with a hoplon.core constructor function to ckeditor? the workaround would be to pass it an element you created yourself with document.createElement
@alandipert do you recall why we override the low level function?
@thedavidmeister maybe comment out all the overrides and see what breaks?