Skip to content

Commit

Permalink
[#319] Implement icon display on keyboard focus
Browse files Browse the repository at this point in the history
  • Loading branch information
palagdan authored and blcham committed Nov 20, 2024
1 parent 043867f commit 927906e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/components/Question.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ export default class Question extends React.Component {
}
};

_onMouseEnterHandler = () => {
_onEnterHandler = () => {
this.setState({ showIcon: true });
};

_onMouseLeaveHandler = () => {
_onLeaveHandler = () => {
this.setState({ showIcon: false });
};

Expand Down Expand Up @@ -224,8 +224,10 @@ export default class Question extends React.Component {
as={Card.Header}
onClick={this._toggleCollapse}
className={this._getHeaderClassName()}
onMouseEnter={this._onMouseEnterHandler}
onMouseLeave={this._onMouseLeaveHandler}
onMouseEnter={this._onEnterHandler}
onMouseLeave={this._onLeaveHandler}
onFocus={this._onEnterHandler}
onBlur={this._onLeaveHandler}
>
<div className="d-inline" id={question["@id"]}>
{collapsible &&
Expand Down Expand Up @@ -356,8 +358,10 @@ export default class Question extends React.Component {
key={"row-item-" + i}
className={cls}
id={question["@id"]}
onMouseEnter={this._onMouseEnterHandler}
onMouseLeave={this._onMouseLeaveHandler}
onMouseEnter={this._onEnterHandler}
onMouseLeave={this._onLeaveHandler}
onFocus={this._onEnterHandler}
onBlur={this._onLeaveHandler}
>
<div className="answer-content" style={this._getAnswerWidthStyle()}>
<Answer
Expand Down

0 comments on commit 927906e

Please sign in to comment.