From 111ad0b39d882eef5f67ed3531f6631e32f347d3 Mon Sep 17 00:00:00 2001 From: Muffin Date: Sat, 30 Dec 2023 16:06:53 -0600 Subject: [PATCH] Remove comment length limit --- core/scratch_block_comment.js | 7 ------- core/workspace_comment.js | 6 ------ core/workspace_comment_render_svg.js | 1 - 3 files changed, 14 deletions(-) diff --git a/core/scratch_block_comment.js b/core/scratch_block_comment.js index b66819f678..2d349aa65a 100644 --- a/core/scratch_block_comment.js +++ b/core/scratch_block_comment.js @@ -152,12 +152,6 @@ Blockly.ScratchBlockComment.TEXTAREA_OFFSET = 12; */ Blockly.ScratchBlockComment.MAX_LABEL_LENGTH = 12; -/** - * Maximum character length for comment text. - * @private - */ -Blockly.ScratchBlockComment.COMMENT_TEXT_LIMIT = 8000; - /** * Width that a minimized comment should have. * @private @@ -226,7 +220,6 @@ Blockly.ScratchBlockComment.prototype.createEditor_ = function() { var textarea = document.createElementNS(Blockly.HTML_NS, 'textarea'); textarea.className = 'scratchCommentTextarea scratchCommentText'; textarea.setAttribute('dir', this.block_.RTL ? 'RTL' : 'LTR'); - textarea.setAttribute('maxlength', Blockly.ScratchBlockComment.COMMENT_TEXT_LIMIT); textarea.setAttribute('placeholder', Blockly.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT); body.appendChild(textarea); this.textarea_ = textarea; diff --git a/core/workspace_comment.js b/core/workspace_comment.js index 02c6e3fecd..2e7796894c 100644 --- a/core/workspace_comment.js +++ b/core/workspace_comment.js @@ -127,12 +127,6 @@ Blockly.WorkspaceComment = function(workspace, content, height, width, minimized */ Blockly.WorkspaceComment.MAX_LABEL_LENGTH = 12; -/** - * Maximum character length for comment text. - * @private - */ -Blockly.WorkspaceComment.COMMENT_TEXT_LIMIT = 8000; - /** * Dispose of this comment. * @package diff --git a/core/workspace_comment_render_svg.js b/core/workspace_comment_render_svg.js index fe7542ec07..59ef1fa68b 100644 --- a/core/workspace_comment_render_svg.js +++ b/core/workspace_comment_render_svg.js @@ -186,7 +186,6 @@ Blockly.WorkspaceCommentSvg.prototype.createEditor_ = function() { var textarea = document.createElementNS(Blockly.HTML_NS, 'textarea'); textarea.className = 'scratchCommentTextarea scratchCommentText'; textarea.setAttribute('dir', this.RTL ? 'RTL' : 'LTR'); - textarea.setAttribute('maxlength', Blockly.WorkspaceComment.COMMENT_TEXT_LIMIT); textarea.setAttribute('placeholder', Blockly.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT); body.appendChild(textarea); this.textarea_ = textarea;