Adaverse commented on code in PR #30950:
URL: https://github.com/apache/airflow/pull/30950#discussion_r1205939962
##########
airflow/www/static/js/dag/details/NotesAccordion.tsx:
##########
@@ -106,8 +160,16 @@ const NotesAccordion = ({
maxRows={10}
as={ResizeTextarea}
value={note}
- onChange={(e) => setNote(e.target.value)}
+ onChange={(e) => {
+ setNote(e.target.value);
+ }}
data-testid="notes-input"
+ onFocus={() => {
+ localStorage.setItem(isInputIFocus, "true");
Review Comment:
It is not the problem with the accordion but with how React handles the
events and here we have a mix of flask app builder with React inserted into it,
which makes the situation even more complex. Even if we got rid of the
accordion, given any text box user is typing (in any part of the whole app
given useKeysPress components are mounted), the events will be bubbled to the
`useKeysPress`, and it will perform those actions that will not be desirable to
the user (only while typing). Hence, have put this check using local storage
that will completely stop it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]