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 1, 2024
1 parent 6abc8e8 commit 4f25d94
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 @@ -222,8 +222,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}
>
<h6 className="d-inline" id={question["@id"]}>
{collapsible &&
Expand Down Expand Up @@ -352,8 +354,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 4f25d94

Please sign in to comment.