Skip to content

Fix bug in list RemoveItem#480

Closed
zmnpl wants to merge 1 commit intorivo:masterfrom
zmnpl:list-bugfix
Closed

Fix bug in list RemoveItem#480
zmnpl wants to merge 1 commit intorivo:masterfrom
zmnpl:list-bugfix

Conversation

@zmnpl
Copy link
Copy Markdown
Contributor

@zmnpl zmnpl commented Jul 26, 2020

When a changed function is set, deleting the first element (0-index) lead to a index out of range error because the change event was fired with index = -1.
Now the index will only be decreased if the last item was removed. As a side effect that changes the behavior of the selection slightly:
It will stay at the same place and only move up when the last item was removed.

when a changed function is set, deleting the first element (0-index) lead to a index out of range error.
Now the index will only be decreased if the last item was removed. That changes the behaviour of the selection slightly:
It will stay at the same place and only move up when the last item was removed.
@zmnpl
Copy link
Copy Markdown
Contributor Author

zmnpl commented Oct 22, 2020

Hi, any optinions on this? It is a two lines fix after all :)

Regards

@nyanco01
Copy link
Copy Markdown

Hello.
I am currently suffering from the same bug. Please fix it as I believe it can be fixed with a few changes.

Best regards.

@rivo rivo closed this in f5cddba Nov 27, 2022
@rivo
Copy link
Copy Markdown
Owner

rivo commented Nov 27, 2022

The latest commit should fix this.

If you want issues like this to be resolved sooner (or at all), please read the Contributing Guidelines, specifically the section about opening an issue before submitting a pull request. (Especially since the proposed solution of this PR would have introduced more bugs.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants