Editor: Fix Safari inability to right-click text #517
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes 12499-gh-calypso-pre-oss
Fixes #327
This pull request seeks to resolve an issue where right-clicking text in the post editor would present the user with a set of options related to using the post preview iframe in Safari.
Before:
After:
Implementation notes:
The key change here was to set the height of the preview to zero, only to be restored to
100%
as the preview is visible. A delay is added to the height transition in the default state to ensure that the "fade out" transition has time to be shown to the user.Some styles were shifted around to manage
z-index
andopacity
in the.web-preview
styles.Testing instructions:
Verify that right-click presents the correct text formatting options in Safari and in your preferred browser. Ensure that transitions still occurs as expected when previewing the post. Also check that previous issues with iOS Safari editor usability are not reintroduced here (10332-gh-calypso-pre-oss).
Caveats:
Without text in the post editor area, a right-click may show the iframe options. These are the options for the TinyMCE frame and is expected when there is no text occupying that area of the editor.