mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
chore: Remove various IE hacks and workarounds (#6781)
* chore: Remove IE-specific hacks from flyout_base.ts. * chore: Remove IE hacks from workspace_svg.ts. * chore: Remove IE hacks from css.ts. * chore: Remove IE hacks from xml.ts. * chore: Remove IE hacks from grid.ts. * chore: Remove errant logging from flyout_base.ts. * chore: Remove obsolete comments about IE from bootstrap.js. * chore: Remove reference to IE from README. * chore: Clean up trailing spaces in bootstrap.js.
This commit is contained in:
@@ -529,14 +529,9 @@ export abstract class Flyout extends DeleteArea implements IFlyout {
|
||||
this.svgGroup_?.setAttribute('height', height.toString());
|
||||
this.workspace_.setCachedParentSvgSize(width, height);
|
||||
|
||||
if (this.svgGroup_?.tagName === 'svg') {
|
||||
if (this.svgGroup_) {
|
||||
const transform = 'translate(' + x + 'px,' + y + 'px)';
|
||||
dom.setCssTransform(this.svgGroup_, transform);
|
||||
} else {
|
||||
// IE and Edge don't support CSS transforms on SVG elements so
|
||||
// it's important to set the transform on the SVG element itself
|
||||
const transform = 'translate(' + x + ',' + y + ')';
|
||||
this.svgGroup_?.setAttribute('transform', transform);
|
||||
}
|
||||
|
||||
// Update the scrollbar (if one exists).
|
||||
@@ -603,19 +598,6 @@ export abstract class Flyout extends DeleteArea implements IFlyout {
|
||||
|
||||
this.layout_(flyoutInfo.contents, flyoutInfo.gaps);
|
||||
|
||||
// IE 11 is an incompetent browser that fails to fire mouseout events.
|
||||
// When the mouse is over the background, deselect all blocks.
|
||||
function deselectAll(this: Flyout) {
|
||||
const topBlocks = this.workspace_.getTopBlocks(false);
|
||||
for (let i = 0, block; block = topBlocks[i]; i++) {
|
||||
block.removeSelect();
|
||||
}
|
||||
}
|
||||
|
||||
this.listeners_.push(browserEvents.conditionalBind(
|
||||
(this.svgBackground_ as SVGPathElement), 'pointerover', this,
|
||||
deselectAll));
|
||||
|
||||
if (this.horizontalLayout) {
|
||||
this.height_ = 0;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user