Created attachment 588332 [details]
testcase (clicking should have no effect)
Confirmed. Same behavior at least as far back as Firefox 3.5.16, so not a regression, at least not a recent one.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:22.214.171.124) Gecko/20101130 Firefox/3.5.16
Created attachment 588486 [details] [diff] [review]
Comment on attachment 588486 [details] [diff] [review]
One suggestion -- a brief comment would be helpful above or inside SetWhitespaceHandling(), just to be clear up-front what it's trying to do.
> // Trim whitespace up to the first non-whitespace frame
> // and after the last non-whitespace frame.
r=me with that