← All bug reports

FS#2790Text dialog: Ctrl+Enter / Cmd+Enter does not confirm the dialog

Type
Bug
Status
Closed
Resolution
Fixed
Category
QCAD (main)
Severity
Low
Priority
Low
Reported version
27.0.6
Operating system
All
Reported
2026-11-24 by andrew

Steps to reproduce:

  1. Start Draw > Text (or double-click an existing text entity).
  2. Type some text in the text dialog.
  3. Press Cmd+Enter (macOS) or Ctrl+Enter (Windows, Linux).

Expected: The dialog is accepted, as if OK was clicked.

Actual: Nothing happens, the dialog stays open. This warning is logged:
qrc:generator/js/QDialog.js:2257: TypeError: Cannot read property
'accept' of undefined

Cause: In scripts/Draw/Text/TextDialog/TextDialog.js the OK action was
connected with the wrong receiver:
this.actionOk.triggered.connect(this, this.dialog.accept);
QDialog.prototype.accept then ran with the script object as 'this'
instead of the QDialog wrapper.

Fix: Use the dialog as receiver:
this.actionOk.triggered.connect(this.dialog, this.dialog.accept);