Fix #1275 by adding a more specific rule for overflow:visible on the … (#1280)

* Fix #1275 by adding a more specific rule for overflow:visible on the drag surface svg.  This wins out over a common bootstrap rule that says: svg:not(:root) {overflow:hidden} and helps avoid a difficult problem for Blockly users to diagnose.

* Update css.js
This commit is contained in:
picklesrus 2017-08-15 13:20:51 -07:00 committed by Paul Kaplan
parent 92e6d339f4
commit 0c09d60ff7
2 changed files with 7 additions and 2 deletions

View file

@ -186,10 +186,15 @@ Blockly.Css.CONTENT = [
'.blocklyWsDragSurface {',
'display: none;',
'position: absolute;',
'overflow: visible;',
'top: 0;',
'left: 0;',
'}',
/* Added as a separate rule with multiple classes to make it more specific
than a bootstrap rule that selects svg:root. See issue #1275 for context.
*/
'.blocklyWsDragSurface.blocklyOverflowVisible {',
'overflow: visible;',
'}',
'.blocklyBlockDragSurface {',
'display: none;',

View file

@ -93,7 +93,7 @@ Blockly.WorkspaceDragSurfaceSvg.prototype.createDom = function() {
'xmlns:html': Blockly.HTML_NS,
'xmlns:xlink': 'http://www.w3.org/1999/xlink',
'version': '1.1',
'class': 'blocklyWsDragSurface'
'class': 'blocklyWsDragSurface blocklyOverflowVisible',
}, null);
this.container_.appendChild(this.SVG_);
};