resucutie / localbooru

Cross platform local booru collection that exclusively works on local storage, without selfhosting
GNU General Public License v3.0
26 stars 1 forks source link

Bug: Typing indicator moves on editing sources link #21

Closed admbeck closed 1 week ago

admbeck commented 2 weeks ago

Describe the bug If you edit a source link typing indicator moves to the end of the line making editing difficult.

To Reproduce Steps to reproduce the behavior:

  1. Edit image
  2. Click on source link in the middle or in the beginning
  3. Start typing or deleting part of the link
  4. See typing cursor move to the end of the link

Expected behavior Typing cursor should not reset when the link is edited

Screenshots image image

System information:

admbeck commented 2 weeks ago

Not an issue on the newest dev build. I guess it's going to be resolved in 1.6.0?

resucutie commented 1 week ago

I'll see if I can resolve it. Seems like an issue with state changes

resucutie commented 1 week ago

Oh. you said it was fixed
Video proof of fix

https://github.com/user-attachments/assets/162acf81-1efc-41ce-b3e5-3f2d43de60da

But I've noticed it is printing this when I type

The following StackOverflowError was thrown while calling onChanged:
Stack Overflow

When the exception was thrown, this was the stack:
#0      _ListStringTextInputState._uploadChanges
(package:localbooru/views/image_manager/components/list_string_text_input.dart:34:5)
#1      _ListStringTextInputState._uploadChanges
(package:localbooru/views/image_manager/components/list_string_text_input.dart:35:9)
#2      _ListStringTextInputState._uploadChanges
(package:localbooru/views/image_manager/components/list_string_text_input.dart:35:9)
#3      _ListStringTextInputState._uploadChanges
(package:localbooru/views/image_manager/components/list_string_text_input.dart:35:9)
#4      _ListStringTextInputState._uploadChanges
(package:localbooru/views/image_manager/components/list_string_text_input.dart:35:9)
... (and it repeats)
resucutie commented 1 week ago

Coding skills 100

void _uploadChanges() {
    _uploadChanges();
    widget.onChanged(_currentValue);
}

Well, removing the obvious infinite calling stops the stack overflow and it doesn't return with the original error