Skip to content

print function opens up print webpage popup #3678

@oneplusiota

Description

@oneplusiota

p5.js version

2.0.5

What is your operating system?

Mac OS

Web browser and version

Google Chrome 140.0.7339.208 (Official Build) (arm64)

Actual Behavior

Using print function to print variables open up the print webpage popup instead of printing in the console.

screenshot for reference:

It happens only when the print function is written without any arguments and the auto-refresh is kept on.

Image

On typing some variable afterwards it correctly prints the variable in the consiole without the above issue.

Image

Expected Behavior

Expecting the code to not open the print popup.

It should either throw some error saying print can't be called with no arguments or should not print anything to console and let the user figure out the error.

Steps to reproduce

Steps:

  1. paste the below code.
  2. run the code and you will see that the print popup shows up

Snippet:

function setup() {
  createCanvas(400, 400);
}

function draw() {
  background(220);
  print()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardBugError or unexpected behaviors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions