(#43) fixed bugs in focus handling, improved performance of dragging selection