mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Prevent some event bubbling issues
This commit is contained in:
parent
ee25b41d7e
commit
93c616de23
2 changed files with 5 additions and 1 deletions
|
@ -41,7 +41,10 @@ class SelectorComponent extends React.Component<SelectorProps, SelectorState> {
|
|||
for (const option of this.props.options) {
|
||||
result.push(
|
||||
<div className="sbSelectorOption"
|
||||
onClick={() => this.props.onChange(option.label)}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
this.props.onChange(option.label);
|
||||
}}
|
||||
key={option.label}>
|
||||
{option.label}
|
||||
</div>
|
||||
|
|
|
@ -237,6 +237,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||
ref={this.descriptionOptionRef}
|
||||
type="text"
|
||||
value={this.state.description}
|
||||
onContextMenu={(e) => e.stopPropagation()}
|
||||
onChange={(e) => this.descriptionUpdate(e.target.value)}
|
||||
onFocus={() => this.setState({chapterNameSelectorOpen: true})}>
|
||||
</input>
|
||||
|
|
Loading…
Reference in a new issue