4

Steps to reproduce:

  • Open Safari on macOS.
  • Add a comment on any Stack Exchange post.
  • Turn on speech recognition entry on the mac (typically double-tap the fn-like key, but your system may vary).
  • Talk and keep talking.

The comment box has text in, but the message below still displays "Enter at least 15 characters".

This also happens if you turn on speech recognition entry after typing some text into the box.

3
  • 1
    For me an emoji selector pops up and goes away since I double-tapped it. But the "x characters left" feature still works. Commented Jul 25 at 17:06
  • @CaveJohnson just turn on speech recognition entry, however your mac is setup to do that, you'll see the bug
    – Fattie
    Commented Jul 25 at 17:46
  • @Fattie Reproduced in theory, but not in practice. Can you test in the Stack Snippet in my answer, and see if the counter updates there?
    – wizzwizz4
    Commented Jul 25 at 21:05

1 Answer 1

9
$(this).on("blur focus keyup paste charCounterUpdate",e.DelayedReaction(…

It seems Safari's speech recognition isn't firing any of these events. I'm not sure which event it does fire, but it should fire input as well. The Vista-era Windows Speech Recognition does (I don't have a macOS machine to test on).

I'm not entirely sure why they have this big list, instead of just using input. Maybe this code predates the input event(??), or maybe the programmer just didn't know about it.

let txt = document.querySelector("textarea");
let div = document.querySelector("div");
txt.addEventListener('input', e => div.innerText = txt.value.length);
<textarea></textarea>
<div aria-live=polite></div>

Can you test your entry method in this box, please?

2
  • So a bug in Safari then?
    – user1502910
    Commented Jul 25 at 21:33
  • 6
    @testing-for-ya No: no keys are being released, so keyup shouldn't fire. Same for the others. charCounterUpdate appears to be a synthetic event that never fires (a legacy of a now-unused jQuery library? or just a change in the mod-only version of jQuery?).
    – wizzwizz4
    Commented Jul 25 at 21:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .