Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,19 @@
top: $block-toolbar-height + $block-padding;
}

// Rules inside this query are only run by Microsoft Edge.
// Edge has bugs around position: sticky; combined with transform, so create different rules.
@supports (-ms-ime-align:auto) {
// Move the block toolbar upwards using margin, as translate doesn't work.
margin-top: -$block-toolbar-height -$block-padding -$border-width;

// Disable the technique used to move the block toolbar upwards in non-edge browsers.
transform: translateY(0);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The need for this is puzzling because the comment on the margin-top above indicates that translate isn't working.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is very puzzling indeed. Perhaps you are on a newer version of Edge than my VM, and perhaps that version of Edge fixes this. I'm working from my home office today so it's a bit harder for me to test, so I would love additional eyes on how this toolbar works across versions of Edge, because right now I can't reproduce.

@talldan talldan Sep 24, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is odd. I'm also now seeing that it looks fine in master. Maybe my cache hadn't cleared when I switched to master to test it.

I'm also on 42.17134.1.0.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm. That's interesting indeed. I'm adding "In progress" label for now, and removing milestone, just so we don't end up fixing something that's fixed in the browser itself. I will be sure to check the browser version in my coworking space tomorrow, see if it's an older one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iiiiiinteresting, the plot thickens. Behold my Edge version:

screen shot 2018-09-25 at 10 07 58

And still seeing the issue:

screen shot 2018-09-25 at 10 07 43

Stay tuned as I download a new vbox image with a newer version and try again.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay, it's fixed in the newer version:

screen shot 2018-09-25 at 12 02 32

screen shot 2018-09-25 at 12 02 41

Since Edge auto updates, I'm ging to close this one as now obsolete. Wohoo! Thanks for the sanity checks.


// Stick to the top which is different because of using margins instead of translate.
top: -$border-width;
}

// This is an important one. Because the toolbar is sticky, it's part of the flow.
// It behaves as relative, in other words, until it reaches an edge and then behaves as fixed.
// But by applying a float, we take it out of this flow. The benefit is that we don't need to compensate for margins.
Expand Down