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

Post revisions: Make diff content visible on MS Edge Win 10 #20186

Merged
merged 1 commit into from
Nov 27, 2017

Conversation

frontdevde
Copy link
Contributor

@frontdevde frontdevde commented Nov 24, 2017

This PR

  • fixes an issue that caused Diff content to not be visible on MS Edge Win 10

The Issue was caused by using window.scrollTo on an element. Webkit based browsers and Firefox auto-correct the behavior and allow the use of window.scrollTo on an element as well. IE/Edge, on the other hand, is less forgiving. So in Edge, this caused an error that stopped further execution and thus prevented the revision content from being displayed. The straightforward solution to the problem is to use Element.scrollTop instead.

How to test

  • Open the latest version of the Edge browser on Windows 10
    (Tip: If you don't have a local version you can use our browserstack.com account.)
  • Navigate to or create a post with revisions
  • Click on the History button to trigger the Post Revisions modal
  • The revisions should load including their content
  • It should look like the After state, not like the before state
  • The revision content window should scroll to the first revised word

Next:

  • Open the latest version of Chrome on Mac OS X or Windows
  • Proceed in this browser with the same process as described above
  • Open wpcalypso.wordpress.com in a second tab
  • Repeat the same process in the second tab as described above
  • The behavior in tab 1 and tab 2 should be identical

Before

msedge-win10-snapshot-1-running-2017-11-21-09-58-51 1

After

screen shot 2017-11-23 at 23 01 16

@frontdevde frontdevde added [Feature] Post/Page Editor The editor for editing posts and pages. [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Nov 24, 2017
@frontdevde frontdevde self-assigned this Nov 24, 2017
@matticbot
Copy link
Contributor

@frontdevde frontdevde changed the title Post revisions: Post revisions: Make diff content visible on MS Edge Win 10 Nov 24, 2017
Copy link
Member

@jblz jblz left a comment

Choose a reason for hiding this comment

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

Working well on latest Chrome Mac & Edge Win 10 (browserstack)

@jblz jblz added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Nov 27, 2017
@frontdevde frontdevde merged commit 0d4a8d2 into master Nov 27, 2017
@frontdevde frontdevde deleted the fix/post-revisions/ms-edge-scrollto-issue branch November 27, 2017 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Post/Page Editor The editor for editing posts and pages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants