processing / processing/p5.js-web-editor

Keyword Autocomplete Bug

Open
#4,272 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting Maintainer Approval Bug
Dominant language
JavaScript
Stars
1.7k
Forks
1.7k
Avg merge
3d 4h
Merged PRs (30d)
8

Description

p5.js version

2.3.2

What is your operating system?

Mac OS

Web browser and version

Google Chrome (151.0.7922.174 (Official Build) (arm64))

Actual Behavior
Main Bug:

Whenever you attempt to autocomplete a keyword through the autocompletion menu, specifically by pressing tab to accept the completion, instead of filling it in automatically, it brings the user down to the line below the line you're auto completing on, an example is shown below.

Example:

line 40
line 41 <- current line attempting to autofill on
line 42
line 43
...
pressing tab would do this:
line 41 <- line out of focus now
line 42 <- line now focused (and at the top)
line 43
line 44
...

Expected Behavior
Whats Expected:

When pressing tab to accept a suggestion, it should fill that part of the line with the text shown in the autocomplete popup, but it doesn't seem to do this at the current moment.

Steps to reproduce
Steps:
  1. Open up any sketch in the editor
  2. Write (or already have written) a simple function
  3. On a new line, attempt to call that function and type about half of it, then press tab to autocomplete it, and it will produce the bug.

It's also worth mention that in the same circumstance, attempting to click an autofill suggestion will just not do anything, and will just cancel out the click, but I don't know if this is related.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the web editor using a sketch and a partially typed function name, then trace the autocomplete menu's handling of Tab and suggestion clicks. Confirm that accepting a suggestion inserts the completion on the current line without moving focus, and that clicking a suggestion works as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.