mirror of
https://github.com/discourse/discourse.git
synced 2025-05-03 10:04:35 +08:00

`pos` is the exact position of the click in the entire document `nodePos` is the position of the clicked node itself The idea is that we want the click to be the first position **within the node**. The previous code was checking for the first 2 positions of the entire document. I'd love to add a test for this, but it's very tricky.