No propagate, fix 'attachment save' cancel
* Quote: Ensure that clicks don't propagate to parent * Attachment Save: Check for null; returned if user cancels out
This commit is contained in:
parent
95d393ee89
commit
bfa76b05d2
3 changed files with 29 additions and 7 deletions
|
@ -105,6 +105,15 @@ export class Quote extends React.Component<Props, State> {
|
|||
onClick();
|
||||
}
|
||||
};
|
||||
public handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {
|
||||
const { onClick } = this.props;
|
||||
|
||||
if (onClick) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
onClick();
|
||||
}
|
||||
};
|
||||
|
||||
public handleImageError = () => {
|
||||
// tslint:disable-next-line no-console
|
||||
|
@ -381,7 +390,7 @@ export class Quote extends React.Component<Props, State> {
|
|||
)}
|
||||
>
|
||||
<button
|
||||
onClick={onClick}
|
||||
onClick={this.handleClick}
|
||||
onKeyDown={this.handleKeyDown}
|
||||
className={classNames(
|
||||
'module-quote',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue