Skip to content

Conversation

@jscheffl
Copy link
Contributor

As reported in #45032 the CodeMirror entry boxes are not working.

This is caused by how CodeMirror implements the entry: It is shadowing the original <textarea> fields in HTML. Unfortunately only via JavaScript the content of CodeMirror and HTML is in sync.
...and unfortunately my hand-written JavaScript checked for NULL/empty value before getting to the fields from CodeMirror. So if an object or advanced array was initialized with an empty value, it never reached the onBlur() update action.
Moved the check for empty after the CodeMirror field check.

Alongside figured out that the same as reported for advancedArray was also happening for object, just that the object field was never correctly initialized on empty value. Fixed this as well if a field is type=["object", "null"].

closes: #45032

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Dec 31, 2024
@jscheffl jscheffl added this to the Airflow 2.10.5 milestone Dec 31, 2024
@jscheffl jscheffl added type:bug-fix Changelog: Bug Fixes legacy ui Whether legacy UI change should be allowed in PR and removed area:webserver Webserver related Issues labels Dec 31, 2024
@jscheffl jscheffl merged commit 6eab1f2 into apache:main Dec 31, 2024
44 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 31, 2024
…when empty default (#45313)

(cherry picked from commit 6eab1f2)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
@github-actions
Copy link

Backport successfully created: v2-10-test

Status Branch Result
v2-10-test PR Link

jscheffl added a commit that referenced this pull request Dec 31, 2024
…when empty default (#45313) (#45315)

(cherry picked from commit 6eab1f2)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
HariGS-DB pushed a commit to HariGS-DB/airflow that referenced this pull request Jan 16, 2025
got686-yandex pushed a commit to got686-yandex/airflow that referenced this pull request Jan 30, 2025
vikmary added a commit to vikmary/airflow that referenced this pull request Feb 26, 2025
@jscheffl jscheffl deleted the bugfix/45032-fix-null-initialized-codemirrors branch October 5, 2025 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. legacy ui Whether legacy UI change should be allowed in PR type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Param does not work with type=['array', 'null'], items={'type': 'number'} and None default

2 participants