[BLUR] stop composition on blur - this commit kinda sucks
ATM the composer do not lose the DOM focus if the composer is blurred.
At the next render, the composer will take back the DOM focus and
continue the edition.
This is fine for the grid/topbar composer, but it really sucks for a
standalone composer in the side panel. After editing the composer, click
on the button save of the panel ? Fat luck, you didn't actually confirm
the composer so you don't have the changes. Click on another input ?
Yeah you didn't confirm either. And at the next render, the focus will
randomly leave your input to go back to the composer.
I think functionnaly we really need to stop the composition on blur event.
But some blur events are expected by the composer: if the user click
on the grid on on another sheet to select a range, the composer will
receive a blur event but it should not stop the composition.
I don't have a very good idea to handle those cases. The
implementation I did seems to work but is not a very good design, we just check
the relatedTarget of the blur event (the new focused element) and if it's
"o-sheet" or "o-grid" we put the focus back on the composer.
[IMP] composer: add standalone composer
This commits adds a new type of composer that is standalone and is not
linked to a specific cell. All the inputs that accept formulas in the
CF side panel are now using this new composer.
[REF] composer: rename ComposerStore to CellComposerStore
Description:
[BLUR] stop composition on blur - this commit kinda sucks
ATM the composer do not lose the DOM focus if the composer is blurred. At the next render, the composer will take back the DOM focus and continue the edition.
This is fine for the grid/topbar composer, but it really sucks for a standalone composer in the side panel. After editing the composer, click on the button save of the panel ? Fat luck, you didn't actually confirm the composer so you don't have the changes. Click on another input ? Yeah you didn't confirm either. And at the next render, the focus will randomly leave your input to go back to the composer.
I think functionnaly we really need to stop the composition on blur event. But some blur events are expected by the composer: if the user click on the grid on on another sheet to select a range, the composer will receive a blur event but it should not stop the composition.
I don't have a very good idea to handle those cases. The implementation I did seems to work but is not a very good design, we just check the relatedTarget of the blur event (the new focused element) and if it's "o-sheet" or "o-grid" we put the focus back on the composer.
[IMP] composer: add standalone composer
This commits adds a new type of composer that is standalone and is not linked to a specific cell. All the inputs that accept formulas in the CF side panel are now using this new composer.
[REF] composer: rename ComposerStore to CellComposerStore
Task: : 4045550
review checklist