IE focus selection

HTML

<textarea id="text" value="test" disabled="true"></textarea>
<button id="b1">
Focus then enable
</button>
<button id="b2">
Enable then focus
</button>
<div id="status">Disabled</div>

JavaScript

var $text = $('#text');
var $status = $('#status');

$text.focus(function(){
	$(this).prop('readonly', false);
  $status.text('Enabled');
}).blur(function(){
	$(this).prop('readonly', true);
    $status.text('Disabled');
});

$('#b1').click(function(){
	$text.focus();
  // Will enable in focus handler
});

$('#b2').click(function(){
	$text.prop('readonly', false);
  $status.text('Enabled');
	$text.focus();
})