sugarlabs / musicblocks

Music Blocks -- A musical microworld
https://musicblocks.sugarlabs.org/
GNU Affero General Public License v3.0
565 stars 762 forks source link

Input gets focus lost on cursor move #985

Closed sanatankc closed 6 years ago

sanatankc commented 6 years ago

ezgif com-video-to-gif 2

When I move my mouse even little input gets focus lost. I don't know if it is intentional or not. But it does look like bug to me.

walterbender commented 6 years ago

The problem is the triggering of blur when leaving the selector as opposed to leaving the block. We need to revisit the logic of the interaction.

sanatankc commented 6 years ago

@walterbender, Can I help to solve this?

walterbender commented 6 years ago

Of course. It is all in block.js. The initial issue for the convoluted code was that for some reason there was a problem getting Firefox to update the labels in the selector blocks, hence the overzealous calls to blur. I will make a GCI task from this issue.

sanatankc commented 6 years ago

Thanks, that would be really nice.

walterbender commented 6 years ago

https://codein.withgoogle.com/dashboard/tasks/5302591904808960/

sanatankc commented 6 years ago

I cloned the repo and I am getting following error, on starting MusicBlocks.

palette.js:31 Uncaught TypeError: Cannot read property 'classList' of null
    at activitypalette.ActivityPalette.palette.Palette (palette.js:31)
    at new activitypalette.ActivityPalette (activitypalette.js:11)
    at Object.activity.setup (activity.js:54)
    at Object.setup (sugarizer-compatibility.js:72)
    at sugarizer-compatibility.js:78
    at Object.execCb (require.js:1604)
    at Module.check (require.js:844)
    at Module.<anonymous> (require.js:1084)
    at require.js:129
    at require.js:1127

invoker is somehow null. I tried running online version. It is running fine.

sanatankc commented 6 years ago

I went through stack trace and found in activity.js at line 51.

var activityButton = document.getElementById("activity-button");

activityButton is null here.

walterbender commented 6 years ago

Great to have this one fixed. Thx.