Fork me on GitHub
#hoplon
<
2017-12-17
>
thedavidmeister06:12:40

and if you want a child to not be able to be drag and dropped (e.g. if it is a wysiwyg/input field)

thedavidmeister06:12:44

(defn as-undraggable!
 [el]
 {:pre [(wheel.dom.data/el? el)]
  :post [(wheel.dom.data/el? %)]}
 ; 
 (el
  :draggable "true"
  :dragstart (comp wheel.dom.events/stop-propagation wheel.dom.events/prevent-default)))

James Vickers17:12:39

Does anyone ever have trouble with the auto-reload setup with Hoplon and CSS? It seems to get in this weird mode sometimes where it will notice that a CSS file has changed and reload, but it won't pickup the changes and sometimes it may even show like a version of the page with old (cached?) CSS.

micha17:12:38

which browser?

micha17:12:17

there are browser bugs that have css workarounds

micha17:12:42

does mousing over things cause it to update?

James Vickers17:12:43

Good tip to look at the browser 👍 , Firefox behaves better with the reloads

James Vickers17:12:57

I still have to refresh the page sometimes after a auto-reload but it at least works after that

micha17:12:06

i forget what the workaround was though

micha17:12:30

but there was a snippet of css that triggered the refresh properly to work around this issue

James Vickers17:12:50

Well thanks for that suggestion in the first place

micha17:12:42

i think i may have found it

micha17:12:00

that looks like the workaround

micha17:12:10

@-webkit-keyframes livefix { from { opacity: 1; } to { opacity: 1; } }
html { -webkit-animation: livefix infinite 1s; }

micha17:12:16

just put that in your css somewhere

micha17:12:29

cheesy, but doing things in the browser you're already knee deep in cheese, what's a few more inches

James Vickers17:12:51

Hmm, doesn't seem to work for me.

James Vickers17:12:05

melty cheese abounds

micha17:12:11

oh bummer

James Vickers17:12:22

That's OK, auto-reload is working good in firefox! I haven't really done any CSS before so this is helping a lot. Thanks!

micha17:12:26

i hear that new version of firefox has great dev tools too

micha17:12:36

i'm told they're as good as chrome now

micha17:12:43

so hopefully it will work ok for you

James Vickers17:12:03

I'm just pleased as punch to have auto-reload working well again 🙂

micha17:12:26

i always used chrome because the dev tools were so much better than firebug