move dialog code from browser to currentworkspace