Skip to content

🐛 [Bug]: Canvas API - Multiple event listeners added by clicking on Show canvases button #175

Open
@rnsharma10

Description

@rnsharma10

Describe the bug
Canvas Api bug -

  • Clicking on Show Canvases button creates duplicate event listners.
  • The code written on Show Canvases does not remove the event listners already created, and adds another ones which will result in same events applied multiple times and crashing the page.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Canvas API page
  2. And check event listner available on drawing canvas element
    image
  3. Now click on Show Canvases button once and check event listners on drawing canvas element.
    image
  4. Clicking on same button 5 more times.
    image

Expected behavior
Clicking on Show button multiple times should not create unnecessary more event listeners.

Desktop

  • OS: Windows 10
  • Browser Chrome
  • Version 106

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions