unwanted events

With a colleague, we presented an introduction to code, and I used Observable via this notebook: https://observablehq.com/@metaphorz/the-snake-that-ate-its-tail

Everything for the most part went well, and thanks to other members of this forum for answering some earlier questions.

If you scroll to the very bottom of the notebook, you will see an iframe that encapsulates an instance of cables.gl (which is a data flow language for shaders and geometry). However, it must raise an event that causes the browser to go down to that section of the notebook. I noticed it first when I was talking to the students about the Voyant text mining tool (earlier in the notebook), and then suddenly the browser scrolled down to show the cables.gl interface.

My assumption is that cables.gl is raising some sort of event and the browser is responding. It is a control issue: with some apps loving to take control of the browser page location.

Is there an easy way out of this? I did not see this issue with other apps I’ve tried. I have explored the cables.gl interface and did not see anything to prevent pop-ups and other events.

I can’t see the content in this iframe, I get a “You need to be logged in” message. I’m not sure what browser API it might be using to grab focus; something like window.scrollTo({top: 300, left: 0, behavior: 'smooth'}) isn’t able to scroll vertically in a notebook for me.

I think the patch was mistakenly set to “private” so only could see it. I double checked and it is set to public now. Let me know if that enables you to see it. Thanks for the feedback.

To reproduce the issue, I just load the observable notebook via the earlier URL posted. Then wait. The cables.gl iframe will grab focus, as you point out–usually takes about 10-15 seconds for me.

Sorry for the delay, I don’t see the cables.gl now. Could you post the url or add it back so I could play with it?

Thanks Thomas- I ended up deleting the cables.gl iframe, but instead made a hyperlink to the cables.gl interface. The latest notebook is here: https://observablehq.com/@metaphorz/the-snake-that-ate-its-tail

I received some information from the cables.gl forum that they do quite a bit with focusing to keep things flowing on a web-based interface. What I was testing in the way of wrapping an iframe around cables was not going to work. Curiously, the “steal focus” can go both ways because in the notebook, I also include a link to nodebox live, which is another data flow (node-based) interface. The problem with nodebox live is that there is not enough of a focus because scrolling events inside of the iframe were sent to the browser.