Remove explicit z-index from comment foreign body.

This commit is contained in:
Karishma Chadha 2018-06-14 17:26:00 -04:00
parent 7b0a1d56a8
commit 017f536509
3 changed files with 6 additions and 11 deletions

View file

@ -649,6 +649,10 @@ Blockly.Css.CONTENT = [
// Scratch Comments
'.scratchCommentForeignObject {',
'position: relative;',
'}',
'.scratchCommentBody {',
'background-color: #fef49c;',
'}',

View file

@ -196,7 +196,7 @@ Blockly.ScratchBlockComment.prototype.createEditor_ = function() {
{
'x': Blockly.ScratchBubble.BORDER_WIDTH,
'y': Blockly.ScratchBubble.BORDER_WIDTH + Blockly.ScratchBubble.TOP_BAR_HEIGHT,
'class': 'blocklyCommentForeignObject'
'class': 'scratchCommentForeignObject'
},
null);
var body = document.createElementNS(Blockly.HTML_NS, 'body');

View file

@ -168,21 +168,12 @@ Blockly.WorkspaceCommentSvg.prototype.render = function() {
* @private
*/
Blockly.WorkspaceCommentSvg.prototype.createEditor_ = function() {
/* Create the editor. Here's the markup that will be generated:
<foreignObject class="blocklyCommentForeignObject" x="0" y="10" width="164" height="164">
<body xmlns="http://www.w3.org/1999/xhtml" class="blocklyMinimalBody">
<textarea xmlns="http://www.w3.org/1999/xhtml"
class="blocklyCommentTextarea"
style="height: 164px; width: 164px;"></textarea>
</body>
</foreignObject>
*/
this.foreignObject_ = Blockly.utils.createSvgElement(
'foreignObject',
{
'x': Blockly.WorkspaceCommentSvg.BORDER_WIDTH,
'y': Blockly.WorkspaceCommentSvg.BORDER_WIDTH + Blockly.WorkspaceCommentSvg.TOP_BAR_HEIGHT,
'class': 'blocklyCommentForeignObject'
'class': 'scratchCommentForeignObject'
},
null);
var body = document.createElementNS(Blockly.HTML_NS, 'body');