Open troger385 opened 1 month ago
By refresh, do you mean full page refresh?
Changing view mode or any other changes made to the filter/search doesn't remove the trailing spaces for me. That only happens with full page refresh.
By refresh, do you mean full page refresh?
Changing view mode or any other changes made to the filter/search doesn't remove the trailing spaces for me. That only happens with full page refresh.
@DogmaDragon, No, as in the search starts to filter the currently displayed results based on what you have now typed. To reproduce, it's a tad tricky it seems, as timing is important - you have to have typed a space just before the search function refreshes the results view to see this happen.
But it is definitely happening frequently and very annoying.
Using Chrome Version 130.0.6723.117 and seeing it as well.
https://github.com/user-attachments/assets/f5d58223-e253-4e59-945a-124c09cdd938
Sorry @DogmaDragon, I did not see your reply 3 weeks ago.
The description by @Lamda604 is good. An easy way to reproduce (to ensure proper timing) is to paste a search term that ends with a space. Once the view refreshes, the space will be gone.
Ok, I debugged the JS a bit, I think I found the culprit:
diff --git a/ui/v2.5/src/models/list-filter/filter.ts b/ui/v2.5/src/models/list-filter/filter.ts
index 183b630a25ea..bc33a592ea2a 100644
--- a/ui/v2.5/src/models/list-filter/filter.ts
+++ b/ui/v2.5/src/models/list-filter/filter.ts
@@ -191,7 +191,7 @@ export class ListFilterModel {
ret.disp = Number.parseInt(params.disp, 10);
}
if (params.q) {
- ret.q = params.q.trim();
+ ret.q = params.q;
}
if (params.p) {
ret.p = Number.parseInt(params.p, 10);
When the search term in the filter changes, it triggers an URL update, which triggers an "update filter from URL" operation, which includes that trim. Removing it seems to to the job.
Describe the bug If you write something in the scene search box that ends with a space (because you intend to write something after), the space gets removed as the scene view refreshes.
To Reproduce Steps to reproduce the behavior:
Expected behavior I would expect the space to remain.
Stash Version: (from Settings -> About): v0.27.2
Desktop (please complete the following information):