Apart from having a performance impact, this change also works around bug
399860, which is caused by the selector attempting to redraw itself
while a document is being closed, but docker's unsetCanvas has not yet beenfixes bug
called399860.
CCBUG: 399860