Commit d1148e99 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1212095: The content of text boxes should be reset when clicking 'cancel' button"

parents 6d48f277 09ef3aad
......@@ -27,7 +27,7 @@ jQuery(function($) {
if (typeof tinyMCE != 'undefined') {
var editor = tinyMCE.get(t),
formTop = container.closest('#main-column-container').attr('id');;
formTop = container.closest('#main-column-container').attr('id');
$('.mce-toolbar.mce-first').siblings().toggleClass('d-none');
editor.show();
editor.focus();
......@@ -59,7 +59,10 @@ jQuery(function($) {
displaycontainer.removeClass("d-none");
editcontainer.removeClass("d-none");
if (typeof tinyMCE != 'undefined') {
tinyMCE.get(t).hide();
// Clear any cancelled content back to original
var ed = tinyMCE.get(t);
ed.setContent($('#' + t).text());
ed.hide();
}
else {
$("#" + t).addClass("js-hidden");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment