unset no longer working since 1.10.12
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start with the InteractableBase unset method shown in the issue and compare its 1.10.11 and 1.10.12 behavior. Reproduce the duplicate-interactable case in Chrome, then verify that unset removes the interactable from scope.interactables.list and does not leave duplicates.
Written by the indexing model from the issue text.
Description
If you have questions about the API that aren't answered in the docs or FAQ, try asking in the Gitter chatroom or on Stackoverflow.
If you've found something that looks like a bug, include a link to a minimal demo on JSFilddle, Codepen with instructions to reproduce the bug with and roughly follow the following issue description format:
Expected behavior
Tell us what should happen
I have been using 1.10.11 for a while and updated to the latest version and unset no longer removes my interactables from the list leading to duplicates. The issue happens from version 1.10.12 were unset was modified.
1.10.11
unset (this: InteractableBase) {
super.unset()
scope.interactables.list.splice(scope.interactables.list.indexOf(this), 1)
scope.fire('interactable:unset', { interactable: this })
}
1.10.12
unset (this: InteractableBase) {
super.unset()
const index = scope.interactables.list.indexOf(this)
if (index < 0) return
super.unset()
scope.interactables.list.splice(index, 1)
scope.fire('interactable:unset', { interactable: this })
}
Actual behavior
Tell us what happens instead
when I run the code step by step in 1.10.12 the code jumps over the splice call. I have no idea why but it makes the code no longer work.
System configuration
interact.js version:
1.10.11 to 1.10.12
Browser name and version:
Chrome
Operating System:
Windows 10
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 804
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from taye/interact.js
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
taye/interact.js#1072 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
taye/interact.js#1071 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
taye/interact.js#1069 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
taye/interact.js#1068 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
taye/interact.js#1066 ·
All issues in taye/interact.js
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·