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

This commit is contained in:
Mihail Geshoski
2022-04-04 10:56:32 +08:00
parent 9a75af7805
commit b72e73d6de
5 changed files with 12 additions and 18 deletions
@@ -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');
};
/**
File diff suppressed because one or more lines are too long
@@ -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');
};
/**
+1 -1
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');
};
/**
@@ -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);
},
/**