fix(popupreply): Adjust positioning for IE11#609
Merged
mergify[bot] merged 4 commits intobox:masterfrom Oct 1, 2020
Merged
Conversation
jstoffan
reviewed
Sep 30, 2020
jstoffan
reviewed
Sep 30, 2020
| const prevScale = usePrevious(scale); | ||
|
|
||
| // Keep the options reference the same between renders | ||
| if (!popupOptions.current) { |
Collaborator
There was a problem hiding this comment.
Should this be in a React.useEffect call that only occurs on mount?
Contributor
Author
There was a problem hiding this comment.
Good idea I'll try that
Contributor
Author
There was a problem hiding this comment.
Don't think that works because the hook runs after render and as a result the placement gets misplaced a bit
jstoffan
previously approved these changes
Oct 1, 2020
mingzexiao6
reviewed
Oct 1, 2020
jstoffan
reviewed
Oct 1, 2020
jstoffan
approved these changes
Oct 1, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Due to a previous fix (#540), in IE11 the
PopupReplydoesn't have an elevated stacking context and as a result will appear behind the subsequent page if an annotation is created at the bottom of a page of a document.This PR makes an IE11 specific workaround by defaulting the positioning of the
PopupReplyto the top of the element rather than the bottom. ThePopupListof collaborators is also shortened to avoid getting clipped by the subsequent page.This does not fully solve the problem as there is a edge case that still fails when an annotation is created at the bottom of the page of a document, but the scroll position for the page is such that it is also bounded by the top of the viewport -- then the
PopupReplyappears below (to avoid the top of the viewport) but then still gets cut off by the subsequent page.Non IE11:

IE11 (before):

IE11 (after):
