Fork me on GitHub
#membrane
<
2022-03-07
>
zimablue13:03:35

Hi, is textarea editing working in webgl? I have (I think) identical code which is working in java but not in webgl

phronmophobic16:03:03

This should work. I have noticed that you sometimes have to do a clean before compiling or watching when targeting javascript. Are you getting an error or how does the issue manifest?

zimablue18:03:43

it just doesn't do anything, text appears but cannot be modified. Same code works with java I think. I know that the webgl side is slightly less built out so just thought I'd check before I dug in

zimablue18:03:19

I'm using latest version but wasn't working on an old one either, it's working your side?

phronmophobic18:03:41

yea, it's working for me. how are you building it?

phronmophobic18:03:31

actually, I didn't test that specific snippet, but textareas do work in my test setup

phronmophobic18:03:02

ok, I just tested the following snippet without issue:

(defonce canvas-info (webgl/run
             
                         (membrane.component/make-app #'membrane.basic-components/textarea (atom {:text "yo"}))
                         {:container canvas}))

zimablue18:03:21

shadow-cljs watch

zimablue18:03:30

I'll nuke the shadow-cljs cache I guess

zimablue18:03:40

thanks for testing, sorry for asking

zimablue18:03:48

baffled how the same code's working for you

phronmophobic19:03:50

so the textarea is appearing, but just not responding to mouse clicks and text input?

zimablue20:03:44

the mouse clicks move the highlighted area but delete and keys don't do anything

zimablue20:03:29

I'll take a look tomorrow, I just mocked out my workflow for now. It should be reasonably easy to work out what's happening given the unidirectional data flow I just thought I'd check first

zimablue20:03:38

as slightly short of time

phronmophobic21:03:04

Sorry I can't be more helpful. I'm also pretty busy this week. I should be more open next week.

zimablue13:03:14

(membrane.webgl/run ;; runnable (component/make-app #'basic/textarea (atom {:text "yo"})) {:container (get-canvas)})