split-pane
split-pane copied to clipboard
Filter out resize events if invisible
When splitPane becomes hidden its offsetWidth and offsetHeight is set to zero. This triggers resize handler. Then it calculates maxFirstComponentWidth as a difference between zero offsetWidth and other values, which produces and passes negative "left" value into setLeft. As a result the whole panel shifts beyond the screen after becoming visible again.