Make selection position: relative again, same for cursor

Issue #2237