Skip to content

Commit

Permalink
fixed issue with highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
JediWattson committed Jan 15, 2023
1 parent 27c4f08 commit d286d16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/components/AttachmentCarousel/CarouselActions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class Carousel extends React.Component {
* @param {Object} e
*/
handleKeyPress(e) {
// prevents focus from highlighting around the modal
e.target.blur();
if (e.key === 'ArrowLeft') {
this.props.onCycleThroughAttachments(1);
}
Expand Down
5 changes: 2 additions & 3 deletions src/components/AttachmentCarousel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const propTypes = {

/** Object of report actions for this report */
reportActions: PropTypes.objectOf(PropTypes.shape(reportActionPropTypes)),

};

const defaultProps = {
Expand All @@ -49,7 +48,7 @@ class AttachmentCarousel extends React.Component {
constructor(props) {
super(props);

this.canUseTouchScreen = canUseTouchScreen();
this.canUseTouchScreen = DeviceCapabilities.canUseTouchScreen();
this.makeStateWithReports = this.makeStateWithReports.bind(this);
this.cycleThroughAttachments = this.cycleThroughAttachments.bind(this);
this.toggleArrowsVisibility = this.toggleArrowsVisibility.bind(this);
Expand Down Expand Up @@ -116,7 +115,7 @@ class AttachmentCarousel extends React.Component {
const attachments = [];
_.forEach(actions, ({originalMessage}) => {
if (originalMessage && originalMessage.html) {
const matches = [...originalMessage.html.matchAll(CONST.REGEX.ATTACHMENT_DATA];
const matches = [...originalMessage.html.matchAll(CONST.REGEX.ATTACHMENT_DATA)];

// matchAll captured both source url and name of the attachment
if (matches.length === 2) {
Expand Down

0 comments on commit d286d16

Please sign in to comment.