When you click a square you see the shortest mathematically calculated paths to each space on the board, including the desired square, which is how Dijkstra's algorithm operates. The shortest path to the desired square is then left on the display.
If you try to get to a square that is impossible to reach, those squares are ignored in the shortest path calculation, and the circle teleports to the new square so it cannot get stuck.
Tested on: Firefox 4.0, Chrome 11.0.6x, Internet Explorer 9.0, Safari 5.05
Known Bugs: Sometimes the mouse position gets corrupted using Safari browsers only. If the mouse is not highlighting the correct square, try refreshing the page.