fix a bug: selection is disabled when pane is visible