mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 03:57:09 +03:00
Prevent some event bubbling issues
This commit is contained in:
@@ -41,7 +41,10 @@ class SelectorComponent extends React.Component<SelectorProps, SelectorState> {
|
|||||||
for (const option of this.props.options) {
|
for (const option of this.props.options) {
|
||||||
result.push(
|
result.push(
|
||||||
<div className="sbSelectorOption"
|
<div className="sbSelectorOption"
|
||||||
onClick={() => this.props.onChange(option.label)}
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
this.props.onChange(option.label);
|
||||||
|
}}
|
||||||
key={option.label}>
|
key={option.label}>
|
||||||
{option.label}
|
{option.label}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -237,6 +237,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
ref={this.descriptionOptionRef}
|
ref={this.descriptionOptionRef}
|
||||||
type="text"
|
type="text"
|
||||||
value={this.state.description}
|
value={this.state.description}
|
||||||
|
onContextMenu={(e) => e.stopPropagation()}
|
||||||
onChange={(e) => this.descriptionUpdate(e.target.value)}
|
onChange={(e) => this.descriptionUpdate(e.target.value)}
|
||||||
onFocus={() => this.setState({chapterNameSelectorOpen: true})}>
|
onFocus={() => this.setState({chapterNameSelectorOpen: true})}>
|
||||||
</input>
|
</input>
|
||||||
|
|||||||
Reference in New Issue
Block a user