formula question comment doesnt error
refs CNVS-29570 fixes CNVS-30429 test plan: - edit a quiz and add formula question - click to add an answer comment - it should not error when the rce opens - test other question type comments and make sure they dont error Change-Id: I06a52be1827c53d440f5b2f2737512c26fb1f6bb Reviewed-on: https://gerrit.instructure.com/83554 Reviewed-by: Ryan Taylor <rtaylor@instructure.com> Reviewed-by: Marc Alan Phillips <mphillips@instructure.com> Tested-by: Jenkins QA-Review: Michael Hargiss <mhargiss@instructure.com> Product-Review: Ben Rinaca <brinaca@instructure.com>
This commit is contained in:
parent
1dd1b25710
commit
d2425d8d2c
|
@ -2115,17 +2115,22 @@ define([
|
|||
|
||||
// create toggler instance on the first click
|
||||
if (!toggler) {
|
||||
var tinyOptions = {}
|
||||
|
||||
var inputColumn = $comment.parents().find('.answer_type:visible')[0]
|
||||
|
||||
var rightMargin = parseInt($comment.css('marginRight')) || 0
|
||||
var leftMargin = parseInt($comment.css('marginLeft')) || 0
|
||||
var commentMargin = rightMargin + leftMargin
|
||||
if (inputColumn) {
|
||||
var rightMargin = parseInt($comment.css('marginRight')) || 0
|
||||
var leftMargin = parseInt($comment.css('marginLeft')) || 0
|
||||
var commentMargin = rightMargin + leftMargin
|
||||
|
||||
var rceWidth = inputColumn.offsetWidth - commentMargin
|
||||
var rceWidth = inputColumn.offsetWidth - commentMargin
|
||||
tinyOptions.width = rceWidth
|
||||
}
|
||||
|
||||
toggler = new EditorToggle($comment_html, {
|
||||
editorBoxLabel: $link.title,
|
||||
tinyOptions: {width: rceWidth}
|
||||
tinyOptions: tinyOptions
|
||||
});
|
||||
|
||||
toggler.editButton = $link;
|
||||
|
|
Loading…
Reference in New Issue