Fixed cursor positioning issue on WebKit

See this issue (https://github.com/owncloud/apps/issues/1661) for the details of the bug, but this fixes the problem.