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: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/5cef1d984f602a1c75508f680afdb385423561f2/utilityOverlay.js/buggy/xpfe/communicator/resources/content/utilityOverlay.js