(e: MouseEvent)
| 510 | } |
| 511 | |
| 512 | _onclick(e: MouseEvent) { |
| 513 | e.stopImmediatePropagation(); |
| 514 | |
| 515 | if (this.nonInteractive) { |
| 516 | return; |
| 517 | } |
| 518 | |
| 519 | if (this.loading) { |
| 520 | e.preventDefault(); |
| 521 | return; |
| 522 | } |
| 523 | |
| 524 | const { |
| 525 | altKey, |
| 526 | ctrlKey, |
| 527 | metaKey, |
| 528 | shiftKey, |
| 529 | } = e; |
| 530 | |
| 531 | const prevented = !this.fireDecoratorEvent("click", { |
| 532 | originalEvent: e, |
| 533 | altKey, |
| 534 | ctrlKey, |
| 535 | metaKey, |
| 536 | shiftKey, |
| 537 | }); |
| 538 | |
| 539 | if (prevented) { |
| 540 | e.preventDefault(); |
| 541 | return; |
| 542 | } |
| 543 | |
| 544 | if (this._isSubmit) { |
| 545 | submitForm(this); |
| 546 | } |
| 547 | |
| 548 | if (this._isReset) { |
| 549 | resetForm(this); |
| 550 | } |
| 551 | |
| 552 | if (isSafari()) { |
| 553 | this.getDomRef()?.focus(); |
| 554 | } |
| 555 | } |
| 556 | |
| 557 | _onmousedown() { |
| 558 | if (this.nonInteractive) { |
no test coverage detected