Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IE11 formatting toolbar visibility #7413

Merged
merged 1 commit into from
Jun 21, 2018

Conversation

brandonpayton
Copy link
Member

Description

IE11 does not support position: sticky, and we were using it to position the formatting toolbar. This resulted in a toolbar that was only partially visible in IE11. This PR updates our styles to start with position: relative which also provides a coordinate system but does not have the sticky behavior. Then we apply position: sticky for the browsers that support it.

All whitespace changes are due to VSCode applying policies set by our .editorconfig.

Fixes #7187.

How has this been tested?

  • Loaded a post in IE11 and observed the full visibility and position of right- and left-aligned toolbars.
  • Loaded a post in Chrome, Firefox, and macOS Safari, observed the full visibility and position of right- and left-aligned toolbars, and tested sticky behavior when scrolling a left-aligned toolbar to the top.
  • Loaded a post in iOS Safari and observed there were no apparent changes to toolbar display there.

Screenshots

screen shot 2018-06-20 at 8 07 48 am

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@brandonpayton brandonpayton requested a review from jasmussen June 20, 2018 15:35
@jasmussen
Copy link
Contributor

This is cool, thank you for working on this. This is also serendipitously timed, as I have a couple of PRs that massively refactor these aspects of the particular SCSS files in question: #7223 and #7365. I suspect I would've encountered this issue when I tested in IE, so thanks for fixing this in advance for me :D 🏅

Another option on our table is to only allow the "fix toolbar to top" option in sticky-unsupporting browsers, or at least default to that. But this can be looked at separately if at all. My rebase is going to be fun :D — but I'm still happy, thanks.

On the branch in question, I can confirm the issue exists, and that this PR fixes it in IE11 for me. The code also looks good 👍 👍

IE11 does not support `position: sticky`, and we were using it
unconditionally to position the formatting toolbar. This updates
our styles to start with `position: relative` which also provides
a coordinate system but does not have the sticky behavior. Then
we apply `position: sticky` for the browsers that support it.
@brandonpayton brandonpayton force-pushed the fix/ie11-formatting-toolbar-visibility branch from 900e2da to 6c40c18 Compare June 21, 2018 19:39
@brandonpayton brandonpayton merged commit e6d435f into master Jun 21, 2018
@brandonpayton brandonpayton deleted the fix/ie11-formatting-toolbar-visibility branch June 21, 2018 22:50
@brandonpayton
Copy link
Member Author

Thanks, @jasmussen! I hope your rebase is smoother than projected.

oxyc added a commit to generoi/gutenberg that referenced this pull request Jun 26, 2018
* 'master' of https://github.com/WordPress/gutenberg: (69 commits)
  fix: Show permalink editor in editor (WordPress#7494)
  Fix text wrapping in Firefox. (WordPress#7472)
  Try another approach to fixing the sibling inserter in Firefox (WordPress#7530)
  fix: Improve "add block" text in NUX onboarding (WordPress#7511)
  Implement core style of including revisions data on Post response (WordPress#7495)
  Testing: Add e2e test for PluginPostStatusInfo (WordPress#7284)
  Add end 2 end test for sidebar behaviours on mobile and desktop. (WordPress#6877)
  Only save metaboxes when it's not an autosave (WordPress#7502)
  Fix broken links in documentation (WordPress#7532)
  Remove post type 'viewable' compatibility shim (WordPress#7496)
  Fix typo. (WordPress#7528)
  Blocks: Remove wrapping div from paragraph block (WordPress#7477)
  fix: change import for InnerBlocks (WordPress#7484)
  Polish library just a teeeeensy bit (WordPress#7522)
  feat: Add snapshot update script (WordPress#7514)
  Display server error message when one exists (WordPress#7434)
  Fix issues with gallery in IE11. (WordPress#7465)
  Polish region focus style (WordPress#7459)
  Fix IE11 formatting toolbar visibility (WordPress#7413)
  Update plugin version to 3.1. (WordPress#7402)
  ...
@mtias mtias added this to the 3.2 milestone Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants