2

just failed an audit. It was for this question:

How to detect if mouse is clicked other than $(this) element

I tried to add a comment explaining that the $(this) selector was always the element that had been clicked, because it was in the click handler.

I know it's a technicality, but it came across as if he was trying to add a "didn't click" handler or something. The comment in the code also confirms he was trying to handle "didn't click" as an event.

I wasn't going to vote it down or anything of course, I just wanted to clarify this wasn't the right approach for this problem, and instead that you needed to select the other elements in the click handler (css solutions aside) - just purely to help with the understanding.

No big deal, but long story short - is this really a high quality question? Personally I'd have lumped it firmly in "it's OK".


EDIT:

I don't really understand how the possible duplicate applies - they're both talking about a similar thing, but I'm specifically referring to this question, not that one. That one also seems to be more about moving or criticising a question, where I was more trying to clarify the approach to the problem.

4
  • “I tried to add a comment explaining that the $(this) selector was always the element that had been clicked, because it was in the click handler.” I think the asker knows that. The point was to change the element back when it wasn’t $(this) anymore. “How do I detect if mouse is clicked other than $(this) element.” doesn’t sound like an attempt to bind a didntclick listener. Sep 12, 2015 at 20:12
  • I got that impression partially because the //if clicked other than the block do stuff comment was outside the click handler, when of course the time to change the other elements back is when you do click on something else.
    – Octopoid
    Sep 12, 2015 at 20:15
  • 1
    SE hasn't yet properly implemented the mind-reader interface, so your intent when commenting on an audit is immaterial. Sep 12, 2015 at 20:54
  • The problem I have with this one isn't that I'm not allowed to comment on an audit question - it's that this question was deemed to be high quality in the first place. It should have been fairly easy to solve with a bit of research, as long as the poster asks the right questions, hence I think it's valid to add a comment clarifying the approach to the problem.
    – Octopoid
    Sep 12, 2015 at 21:19

0

Browse other questions tagged .