MDL-74383 assignfeedback_editpdf: Fix comment issues in the pdf editor

This commit is contained in:
Mihail Geshoski 2022-04-01 12:48:35 +08:00
parent 2202c71a76
commit c1ab472180
5 changed files with 12 additions and 18 deletions

View File

@ -2233,7 +2233,7 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
* @method initializer
* @return void
*/
initializer: function(config) {
initializer: function() {
var editor,
container,
placeholder,
@ -2259,8 +2259,6 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
// Set the body content.
this.set('bodyContent', container);
COMMENTSEARCH.superclass.initializer.call(this, config);
},
/**
@ -2622,7 +2620,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
* @return bool true if menu is active, else false.
*/
this.is_menu_active = function() {
return this.menu.get('visible');
return this.menu !== null && this.menu.get('visible');
};
/**

View File

@ -2233,7 +2233,7 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
* @method initializer
* @return void
*/
initializer: function(config) {
initializer: function() {
var editor,
container,
placeholder,
@ -2259,8 +2259,6 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
// Set the body content.
this.set('bodyContent', container);
COMMENTSEARCH.superclass.initializer.call(this, config);
},
/**
@ -2622,7 +2620,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
* @return bool true if menu is active, else false.
*/
this.is_menu_active = function() {
return this.menu.get('visible');
return this.menu !== null && this.menu.get('visible');
};
/**

View File

@ -243,7 +243,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
* @return bool true if menu is active, else false.
*/
this.is_menu_active = function() {
return this.menu.get('visible');
return this.menu !== null && this.menu.get('visible');
};
/**

View File

@ -33,7 +33,7 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
* @method initializer
* @return void
*/
initializer: function(config) {
initializer: function() {
var editor,
container,
placeholder,
@ -59,8 +59,6 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
// Set the body content.
this.set('bodyContent', container);
COMMENTSEARCH.superclass.initializer.call(this, config);
},
/**