sugarlabs / musicblocks

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

Highlight should not activate near navbar #4056

Open therealharshit opened 5 hours ago

therealharshit commented 5 hours ago

Description

Highlight is getting activated when we drag a block near navbar.

Expected Behavior

Highlight should not activate when we drag a block near navbar.

Vedio

https://github.com/user-attachments/assets/86c4d7cb-770d-4d9c-8766-c23b94578ef6

How to Reproduce

  1. Click on a block to drag.
  2. Drag it to the navbar.
  3. You can see the highlight. ( Refer to the above vedio for more info)

Console log Errors:

No console log errors.

Environment:

Checklist


Thank you for contributing to our project! We appreciate your help in improving it.

πŸ“š See contributing instructions.

πŸ™‹πŸΎπŸ™‹πŸΌ Questions: Community Matrix Server.

therealharshit commented 5 hours ago

@walterbender Have you encountered this issue.

walterbender commented 5 hours ago

I had not noticed that before.

krAtOsnana commented 5 hours ago

@walterbender Have you encountered this issue.

yes, i've encountered the issue

therealharshit commented 5 hours ago

I had not noticed that before.

I'll try to solve this.

krAtOsnana commented 5 hours ago

I had not noticed that before.

I'll try to solve this.

can you share the file path in which you think the problem exists

therealharshit commented 5 hours ago

can you share the file path in which you think the problem exists

the function this.drawSelectionArea() is responsible for highlight which is in js/activity.js

walterbender commented 4 hours ago

draw selection is supposed to be triggered by dragging on the canvas. Maybe what is happening is that when you drag up to the top of the screen, the block drag is ended and it then confuses dragging a block with dragging on the canvas?

krAtOsnana commented 3 hours ago

can you share the file path in which you think the problem exists

the function this.drawSelectionArea() is responsible for highlight which is in js/activity.js

tried some changes and it worked well.

therealharshit commented 2 hours ago

draw selection is supposed to be triggered by dragging on the canvas. Maybe what is happening is that when you drag up to the top of the screen, the block drag is ended and it then confuses dragging a block with dragging on the canvas?

Yes @walterbender you were right, when I made changes which ends the drag on navbar the issue get resolved. Here is a PR #4058 for that please review.