Skip to content

Prevent mouse events from being captured by a live sketch when the cursor is not hovering it #310

Open
@SableRaf

Description

@SableRaf

Current behavior
Mouse clicks register in interactive sketches even when the cursor is not over the sketch window (like clicking on links anywhere in the page). This is particularly problematic in examples like FileIO/SaveOneImage where any click triggers a file save.

Expected behavior
Mouse clicks only register when the cursor is over the sketch window

Possible solution
Embed the sketches into an iFrame. See @trikaphundo's first comment below

The following examples are using MousePressed to capture clicks and may need to be fixed

  • Camera/Orthographic
  • Input/MouseFunctions
  • Structure/Loop
  • Structure/Redraw
  • Web/EmbeddedLinks
  • Avanced Data/ArrayListClass
  • Advanced Data/LoadSaveJSON
  • Advanced Data/LoadSaveTable
  • Cellular Automata/Wolfram
  • FileIO/SaveOneImage
  • GUI/Button
  • Motion/MovingOnCurves
  • Simulate/Flocking
  • Simulate/ForcesWithVectors
  • Simulate/MultipleParticleSystems

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions