rem: try {  var changer = document.getElementById('cmd_SwitchTextDirection'); if (changer) changer.setAttribute('disabled', !document.commandDispatcher.focusedElement); } catch (e) {} 
add: if (gShowBiDi) goUpdateCommand('cmd_switchTextDirection'); 
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    var changer = document.getElementById('cmd_SwitchTextDirection');    if (changer)      changer.setAttribute('disabled',                           !document.commandDispatcher.focusedElement);  }  catch (e) {}}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/94f7b8c2a47054dc65a25304055ccbbf581a8a18/utilityOverlay.js/buggy/suite/common/utilityOverlay.js