On Monday, May 27, 2019 at 10:12:07 PM UTC-7, J Decker wrote: > > > > On Mon, May 27, 2019 at 12:12 PM J Decker <[email protected]> wrote: > >> I have this C app, which shows a application window in an opengl context >> on a canvas. >> I have support for whether a mouse event is used or not, and just return >> that status out... >> When I click on the application form in the edit box, the form of course >> 'uses' the mouse event to set focus to itself and show the I-bar, etc... >> but becaues this mouse event gets consumed, the canvas control doesn't >> actually get focus, so when I type it doesn't get any key input events. I >> have to click in the blank area around the form where the mouse event is >> not 'used', then I'm able to enter keys. >> >> This really seems counter intuitive to me... > if I click on the form, and use the mouse (click?) event in the edit > field, to set the cursor to type there... then the canvas (full window, > with glClear(0,0,0,0) ), does not get focus... I did just double check, > and it returns 1 if used and 0 if not used (it was 0 and not-0, but I > squashed it to 0 and 1). > > but if I click on the outside beyond the frame, where I'm not using the > mouse click(?) event, then I get mouse focus?, and the event get passed to > the page behind it( I can double click and select words in the div behind > the canvas, when the mouse isn't on the frame) > > when I click on the 'unused' canvas area, I do see a blue selection/active > border light up... but not if I use the event. > > I guess HTML Canvas(UI Controls) don't really support click-through focus.... I did some searching after reflecting about using canvas/svg for clickthrough.
This is the least code sort of solution... https://stackoverflow.com/a/37421831/4619267 There is CSS `pointer-events: none;`(or auto) and on SVG elements also 'stroke' and 'fill'. I wonder where I would complain to get a css pointer-events : .... 'soft' ? 'mouse?' is is already pointer something so... something like 'if the control doesn't use it' > > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "emscripten-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/emscripten-discuss/12b82f16-8f0a-4ee1-b544-403e81bb61bd%40googlegroups.com >> >> <https://groups.google.com/d/msgid/emscripten-discuss/12b82f16-8f0a-4ee1-b544-403e81bb61bd%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/c4890fcc-23fa-4866-af8e-f7a707f3e15c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
