mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 21:47:06 +03:00
Only hide chapter name selector when focus lost
This commit is contained in:
@@ -230,7 +230,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
|
|
||||||
{/* Chapter Name */}
|
{/* Chapter Name */}
|
||||||
{sponsorTime.actionType === ActionType.Chapter ? (
|
{sponsorTime.actionType === ActionType.Chapter ? (
|
||||||
<div onMouseLeave={() => this.setState({chapterNameSelectorOpen: false})}>
|
<div>
|
||||||
<input id={"chapterName" + this.idSuffix}
|
<input id={"chapterName" + this.idSuffix}
|
||||||
className="sponsorTimeEdit sponsorTimeEditInput sponsorChapterNameInput"
|
className="sponsorTimeEdit sponsorTimeEditInput sponsorChapterNameInput"
|
||||||
style={{color: "inherit", backgroundColor: "inherit"}}
|
style={{color: "inherit", backgroundColor: "inherit"}}
|
||||||
@@ -239,6 +239,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
value={this.state.description}
|
value={this.state.description}
|
||||||
onContextMenu={(e) => e.stopPropagation()}
|
onContextMenu={(e) => e.stopPropagation()}
|
||||||
onChange={(e) => this.descriptionUpdate(e.target.value)}
|
onChange={(e) => this.descriptionUpdate(e.target.value)}
|
||||||
|
onBlur={() => this.setState({chapterNameSelectorOpen: false})}
|
||||||
onFocus={() => this.setState({chapterNameSelectorOpen: true})}>
|
onFocus={() => this.setState({chapterNameSelectorOpen: true})}>
|
||||||
</input>
|
</input>
|
||||||
{this.state.chapterNameSelectorOpen && this.state.description &&
|
{this.state.chapterNameSelectorOpen && this.state.description &&
|
||||||
|
|||||||
Reference in New Issue
Block a user