javatari.js -- page scrolls to div onload

8 views
Skip to first unread message

LASER BLAST

unread,
Dec 21, 2018, 12:31:07 PM12/21/18
to javatari
hi,

javatari latest version.

i put div for it at bottom of long page. when the page first loads, it scrolls down to the div. why? I dont want it to scroll. i want top of page to be displayed.

let me know if you need an example

thanks.

Paulo Peccin

unread,
Dec 21, 2018, 8:00:25 PM12/21/18
to java...@googlegroups.com
I suppose that is caused by the emulator setting the focus on the screen when it starts, so the user can interact with it. It is designed this way.
Sorry, but I think there is no way of avoiding this right now, unless you tell the emulator not to start when the page loads.

But then you will have to provide you own way for the user to start the emulator.
Making the emulator "not start" by changing the AUTO_START property is different from simply "not powering the machine on". If you tell it not to start, it will not even display its interface on your page until you call the Javatari.start() method.

Peccin

--
You received this message because you are subscribed to the Google Groups "javatari" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javatari+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric H. Jung

unread,
Dec 21, 2018, 8:08:49 PM12/21/18
to java...@googlegroups.com
Thanks for the info and the work-around. It is better than no work-around :)
Out of curiosity, why does the emulator set the focus on the screen when it starts? And what would happen if it did not?

Paulo Peccin

unread,
Dec 21, 2018, 8:22:56 PM12/21/18
to java...@googlegroups.com
If the focus is not on the emulator interface, keys/controls presses will not get detected. The user would have to first click on the interface for the controls to start working.

Paulo

Reply all
Reply to author
Forward
0 new messages