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: Creation of highlights on Edge/IE11/Firefox browsers #322

Merged
merged 12 commits into from
Jan 21, 2019
5 changes: 4 additions & 1 deletion src/AnnotationThread.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ class AnnotationThread extends EventEmitter {
const isPending = this.state === STATES.pending;

const pageEl = this.getPopoverParent();
const popoverLayer = util.getPopoverLayer(pageEl);
this.popoverComponent = render(
<AnnotationPopover
id={this.id}
Expand All @@ -199,8 +200,10 @@ class AnnotationThread extends EventEmitter {
isPending={isPending}
headerHeight={this.headerHeight}
/>,
util.getPopoverLayer(pageEl)
popoverLayer
);

this.scrollIntoView();
pramodsum marked this conversation as resolved.
Show resolved Hide resolved
}

/**
Expand Down
7 changes: 0 additions & 7 deletions src/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
src: local('Lato Bold'), local('Lato-Bold'), url('https://cdn01.boxcdn.net/fonts/1.0.2/lato/Lato-Bold.woff2') format('woff2'), url('https://cdn01.boxcdn.net/fonts/1.0.2/lato/Lato-Bold.woff') format('woff');
}

@import '~box-react-ui/lib/styles/common/overlay';

.ba {
@include reset;

Expand Down Expand Up @@ -96,11 +94,6 @@
@import '~box-react-ui/lib/styles/common/buttons';
}

.flyout-overlay {
@import '~box-react-ui/lib/styles/common/links';
@import '~box-react-ui/lib/styles/common/buttons';
}

/**************************************
* Accessibility
**************************************/
Expand Down
6 changes: 3 additions & 3 deletions src/components/AnnotationPopover/AnnotationPopover.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import PlainButton from 'box-react-ui/lib/components/plain-button';
import IconClose from 'box-react-ui/lib/icons/general/IconClose';

import Internationalize from '../Internationalize';
import Overlay from './Overlay';
import CommentList from '../CommentList';
import { TYPES, CLASS_ANNOTATION_POPOVER, CLASS_ANNOTATION_CARET } from '../../constants';

Expand All @@ -19,6 +18,7 @@ const CLASS_ANIMATE_POPOVER = 'ba-animate-popover';
const CLASS_CREATE_POPOVER = 'ba-create-popover';
const CLASS_MOBILE_HEADER = 'ba-mobile-header';
const CLASS_MOBILE_CLOSE_BTN = 'ba-mobile-close-btn';
const CLASS_POPOVER_OVERLAY = 'ba-popover-overlay';

type Props = {
isMobile: boolean,
Expand Down Expand Up @@ -99,7 +99,7 @@ class AnnotationPopover extends React.PureComponent<Props> {
) : (
<span className={CLASS_ANNOTATION_CARET} />
)}
<Overlay shouldDefaultFocus={!isMobile}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The BRUI overlay was removing the highlights on both Edge and Firefox browsers

<div className={CLASS_POPOVER_OVERLAY}>
pramodsum marked this conversation as resolved.
Show resolved Hide resolved
{hasComments ? (
<CommentList comments={comments} onDelete={onDelete} />
) : (
Expand All @@ -121,7 +121,7 @@ class AnnotationPopover extends React.PureComponent<Props> {
onCommentClick={onCommentClick}
/>
)}
</Overlay>
</div>
</div>
</Internationalize>
);
Expand Down
5 changes: 3 additions & 2 deletions src/components/AnnotationPopover/AnnotationPopover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
}
}

.overlay {
.ba-popover-overlay {
background: white;
border: 1px solid $seesee;
border-radius: 4px;
display: block;
Expand All @@ -50,7 +51,7 @@
white-space: normal;
}

.ba-inline-popover .overlay {
.ba-inline-popover .ba-popover-overlay {
align-items: center;
display: inline-flex;
}
Expand Down
25 changes: 0 additions & 25 deletions src/components/AnnotationPopover/Overlay.js

This file was deleted.

18 changes: 0 additions & 18 deletions src/components/AnnotationPopover/__tests__/Overlay-test.js

This file was deleted.

This file was deleted.

Loading