 		@attach()
 		text = @panelEditor.getText()
 		if text
+			@panelEditor.selectAll()
 			@handleUpdate text
 
 	undo: ->

method = (delegate, method) ->
	delegate?[method]?.bind(delegate) or noop

module.exports = 
class PromptView extends View
	@attach: -> new PromptView


		@trigger 'cancel'
		method(@delegate, 'cancel')()
		@detach()

	detach: ->
		return unless @hasParent()
		@detaching = true
