Birthday date search not working on Mac

AI-generated summary

Users report a bug where searching for the “Day” in the Birthday selector on Mac doesn’t work when pressing Enter, despite the search bar appearing. Chaboi_3000 repros it across Chrome, Firefox, and Safari on Mac—even in incognito mode without extensions. dax initially couldn’t reproduce on Windows10, suggesting it may be macOS-specific. Chaboi_3000 asks dax to test on Mac, but dax lacks a Mac and defers testing to colleagues. Later, justin confirms the bug on Firefox for Mac, theorizing it stems from select-kit’s event handling—specifically, confusion between string and number comparisons when Enter is pressed in the search box. Arrow-key selection works fine. justin notes the issue doesn’t occur on sites using chat integration (also select-kit-based), suggesting a context-specific flaw. j.jaffeux confirms a fix is underway via a commit to discourse-cakeday, tied to an upcoming select-kit update.

When I try to search the “Day” part of the Birthday selector, the search bar shows up but doesn’t work when I hit Enter.

Repro Steps:

  1. Go to user preferences
  2. Go to the date of birth section
  3. Select the “day” part of it and type in a number(eg. 5)
  4. Hit Enter
  5. It should update, but it doesn’t. Either it is broken, or devs accidentally added it.

Browser: "Repro"d on Chrome, Firefox, and Safari
Computer: Mac.

The bug is here on Meta? I successfully changed the day of your birth right now.

Do you have browser extensions? If so can you try to repro it in an incognito window (with no active extensions)?

1 Like

It’s in meta too. Did you press enter after you typed in a number? Because I can repro in private browsing(No extensions) too.

Yes, I did it using Windows10, maybe it’s something that happens only on macOS.

That’s probably it. Can you try repro on your Mac? I’m wondering if it’s just something with my laptop.

I have no Mac. You should wait for one of my colleague to test it (likely after our annual meeting next week).

2 Likes

@dax any updates from the meeting?

Nope, we will try to repro it on Mac early next week.

2 Likes

I can repro this on Firefox for Mac. I’m guessing it has to do with the order of the event when Enter is hit. When you use arrow keys to select a date, it updates just fine when pressing Enter. But in the search box, it closes the window, probably assuming that the same number is selected as prior.

I tried this on my personal site using the chat integration plugin (which also uses select-kit), and I was not able to reproduce. I had a chat with @j.jaffeux, and this has to do with the current implementation of select-kit getting confused comparing a string to a number. He’s working on a new version of select-kit, so this should be fixed when that gets rolled out.

5 Likes

This should be fixed by:

https://github.com/discourse/discourse-cakeday/commit/556fa89a65fa728f25d3b3fd2a6cfb46c083afd9

6 Likes