From 39479d9e182121c2b9b2ceeb535ee6748d6c5cd2 Mon Sep 17 00:00:00 2001 From: cahrens Date: Mon, 4 Feb 2013 13:28:34 -0500 Subject: [PATCH] See if this helps with the tab-changing race condition. --- common/lib/xmodule/xmodule/js/src/html/edit.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/js/src/html/edit.coffee b/common/lib/xmodule/xmodule/js/src/html/edit.coffee index fa83343d7a..ccd7943917 100644 --- a/common/lib/xmodule/xmodule/js/src/html/edit.coffee +++ b/common/lib/xmodule/xmodule/js/src/html/edit.coffee @@ -71,15 +71,16 @@ class @HTMLEditingDescriptor e.preventDefault(); if not $(e.currentTarget).hasClass('current') - $('.editor-tabs .current', @element).removeClass('current') $(e.currentTarget).addClass('current') $('table.mceToolbar', @element).toggleClass(HTMLEditingDescriptor.isInactiveClass) $(@advanced_editor.getWrapperElement()).toggleClass(HTMLEditingDescriptor.isInactiveClass) visualEditor = @getVisualEditor() if $(e.currentTarget).attr('data-tab') is 'visual' + $('.html-tab', @element).removeClass('current') @showVisualEditor(visualEditor) else + $('.visual-tab', @element).removeClass('current') @showAdvancedEditor(visualEditor) # Show the Advanced (codemirror) Editor. Pulled out as a helper method for unit testing.