Skip to content

Commit

Permalink
FIX the destroy of the form, "is submitted" condition icon, and reado…
Browse files Browse the repository at this point in the history
…nly & disable feature (#7363)

Fix the destroy of the form, readonly and disable feature, and a typo for "is submitted" condition icon
  • Loading branch information
NeylMahfouf2608 authored Feb 3, 2025
1 parent bf7ecd9 commit 232359f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Extensions/TextInput/JsExtension.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,8 @@ module.exports = {
),
_('_PARAM0_ value was submitted'),
'',
'res/conditions/surObject24.png',
'res/conditions/surObject.png'
'res/conditions/surObjet24.png',
'res/conditions/surObjet.png'
)
.addParameter('object', _('Text input'), 'TextInputObject', false)
.getCodeExtraInformation()
Expand Down
19 changes: 12 additions & 7 deletions Extensions/TextInput/textinputruntimeobject-pixi-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,14 @@ namespace gdjs {
}

_destroyElement() {
if (!this._input) return;
this._input.remove();
this._input = null;
if (this._form) {
this._form.remove();
this._form = null;
}
if (this._input) {
this._input.remove();
this._input = null;
}
}

onScenePaused() {
Expand Down Expand Up @@ -326,14 +331,14 @@ namespace gdjs {
this._input.style.borderWidth = this._object.getBorderWidth() + 'px';
}
updateDisabled() {
if (!this._form) return;
if (!this._input) return;

this._form.disabled = this._object.isDisabled();
this._input.disabled = this._object.isDisabled();
}
updateReadOnly() {
if (!this._form) return;
if (!this._input) return;

this._form.readOnly = this._object.isReadOnly();
this._input.readOnly = this._object.isReadOnly();
}

updateMaxLength() {
Expand Down

0 comments on commit 232359f

Please sign in to comment.