Fix a frame related selection issue

The problem: when clicking right next to a frame, the cursor is blinking at the left hand side of the frame
Causes: 
1. windows.getSelection() returns wrong position (just before opening frame)
2. StepsTranslator always rounds up position within a frame to the beginning of the frame.