Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Tags are highlighting while my favourite tags is empty
My favourite tags is empty. Although, some tags are highlighting. Usually, I was using another account earlier. I forgot (lost that gmail address) password (I can reset but, I don't want to use that account) of that account. So, I created this account. I had added some tags in favourite tags. Now, those tags are highlighting.
2 answers
The problem mentioned in the question
The original problem mentioned in the question is now fixed. If several users share a computer (or one person has several user accounts), the user who is currently signed in will be the one whose preferences are used.
Previously, preferences were stored in the browser's localStorage just once and would be picked up regardless of which user was currently signed in. This was changed to store the preferences in the browser's localStorage by user id, so only the relevant user's preferences will be picked up.
The change was made several months ago, but I have only just stumbled upon this bug report and realised the problem happened to be fixed by this change. For reference, it was pull request 951 on the qpixel repository.
Related problem mentioned in an answer
The separate problem mentioned in elgonzo's answer also appears to have been affected. I'm not sure if this was related to the same change. The behaviour is now more consistent than described in that answer, but does not match with the note at the top of the preferences page, that says:
Changes are automatically saved once you move away from the input field.
Following the steps in that answer now results in the "Favorite tags" field being updated even if the tab is closed before moving away from the input field. The highlighting of tags in the question list page reflects the change, and navigating back to the preferences page shows the change has been saved.
I'm not sure if the behaviour or the note at the top of the page should be changed, but one way or other they need to match each other, so I've raised this on Codidact Meta.
0 comment threads
I found simple steps to repro the issue on Firefox:
-
In your preferences, set some favourite tag(s). Make sure you click outside of the favourite tags edit field to make sure the edit field has lost input focus.
(When the edit field is losing input focus, data in the browser's local storage is updated to reflect the current favourite tags from the edit field.) -
Navigate to the question list page to verify the highlighting of the favourite tags.
-
Go back to the preferences, and clear the favourite tags edit field. However, this time DO NOT let the text field lose input focus. Directly and immediately navigate away from the preferences page, for example by clicking directly on the link in the top banner leading to the questions list.
(This time, the local storage is not being updated with the changed favourite tags field content.) -
Note how the question lists still highlights the previous favourite tags.
-
Go back to preferences and check again the emptiness of the favourite tags text field.
0 comment threads