Hacker News new | ask | show | jobs
by rafark 238 days ago
Yeah it’s really good. A few weeks ago, some third party script was messing with click events of my react buttons so I figured I should just add a mousedown even to capture the click before the other script. It was late at night and I was exhausted so I wanted to do a quick and dirty approach of simulating a click after a few ms after the mousedown even. So I told Gemini my plan and asked it to tell me the average time in ms for a click event in order to simulate it… and I was shocked when it straight up refused and told me instead to trigger the event on mouseup in combination with mousedown (on mouse down set state and on mouse up check the state and trigger the event). This was of course a much better solution. I was shocked at how it understood the problem perfectly and instead of giving me exactly what I asked for it gave me the right way to go about it.