hoplon

The :hoplon: ClojureScript Web Framework - http://hoplon.io/
2017-12-17T06:32:40.000032Z

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

2017-12-17T06:32:44.000004Z

(defn as-undraggable!
 [el]
 {:pre [(wheel.dom.data/el? el)]
  :post [(wheel.dom.data/el? %)]}
 ; <https://stackoverflow.com/questions/6848140/how-do-i-prevent-drag-on-a-child-but-allow-drag-on-the-parent/38387748#38387748>
 (el
  :draggable "true"
  :dragstart (comp wheel.dom.events/stop-propagation wheel.dom.events/prevent-default)))

2017-12-17T17:38:39.000109Z

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.

micha 2017-12-17T17:39:38.000010Z

which browser?

micha 2017-12-17T17:40:17.000086Z

there are browser bugs that have css workarounds

2017-12-17T17:40:21.000016Z

Chrome

micha 2017-12-17T17:41:42.000029Z

does mousing over things cause it to update?

2017-12-17T17:42:43.000070Z

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

2017-12-17T17:42:57.000088Z

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

micha 2017-12-17T17:43:06.000090Z

i forget what the workaround was though

micha 2017-12-17T17:43:30.000027Z

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

2017-12-17T17:43:50.000023Z

Well thanks for that suggestion in the first place

micha 2017-12-17T17:44:37.000127Z

aha

micha 2017-12-17T17:44:42.000057Z

i think i may have found it

micha 2017-12-17T17:45:00.000039Z

that looks like the workaround

micha 2017-12-17T17:45:10.000002Z

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

micha 2017-12-17T17:45:16.000052Z

just put that in your css somewhere

micha 2017-12-17T17:46:29.000041Z

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

2017-12-17T17:46:51.000053Z

Hmm, doesn't seem to work for me.

2017-12-17T17:47:05.000044Z

melty cheese abounds

micha 2017-12-17T17:47:11.000064Z

oh bummer

2017-12-17T17:49:22.000107Z

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!

micha 2017-12-17T17:51:14.000010Z

sure!

micha 2017-12-17T17:51:26.000083Z

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

micha 2017-12-17T17:51:36.000078Z

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

micha 2017-12-17T17:51:43.000053Z

so hopefully it will work ok for you

2017-12-17T17:52:03.000007Z

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

micha 2017-12-17T17:52:26.000076Z

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