rem: document.getElementById('cmd_SwitchTextDirection').setAttribute('disabled', !document.commandDispatcher.focusedElement); 
add: var changer = document.getElementById('cmd_SwitchTextDirection'); if (changer) changer.setAttribute('disabled', !document.commandDispatcher.focusedElement); 
context: function goUpdateGlobalEditMenuItems(){  goUpdateCommand('cmd_undo');  goUpdateCommand('cmd_redo');  goUpdateCommand('cmd_cut');  goUpdateCommand('cmd_copy');  goUpdateCommand('cmd_paste');  goUpdateCommand('cmd_selectAll');  goUpdateCommand('cmd_delete');  try {    // XXX: implement controller for cmd_SwitchTextDirection    document.getElementById('cmd_SwitchTextDirection').setAttribute('disabled',           !document.commandDispatcher.focusedElement);  }  catch (e) {}}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/b89f27a0f07c646ff2e3fe558ec3c6cb3c1633e0/utilityOverlay.js/buggy/suite/common/utilityOverlay.js