kaiostech / sample-vanilla

Simple example of a to-do list for KaiOS devices
https://developer.kaiostech.com/getting-started/build-your-first-app/sample-code#vanilla
39 stars 13 forks source link

Softkeys doesn't work #7

Open DinoMah opened 3 years ago

DinoMah commented 3 years ago

Doing this project manually I found that softkeys and D-Pad doesn't respond to the actions on a physical device.

DinoMah commented 3 years ago

I discovered something. Removing the type="module" from the import line <script type="module" src="./src/index.js"><script/> Keys now work but I'm unable to import modules from other javascript files. The only workaround that I found is importing scripts from html and then using them in the html script section

manduchi commented 3 years ago

Same problem here. Could you give some more details on your solution? Thanks!

DinoMah commented 3 years ago

Oh, so much time since I did that tutorial, but what simply means is that in the script tag you have to delete the type='module' option but you can't use other scripts, I recommend using a framework because they use webpack and you don't have problems with importing modules, other option is copy-pasting all the code on index.js but I don't recommend it