Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Composer: F4 handler should not bubble out of the composer #4201

Closed
wants to merge 1 commit into from

Conversation

rrahir
Copy link
Collaborator

@rrahir rrahir commented May 13, 2024

Since pull request 21261, the shortcut F4 is handled by the grid component. Unfortunately, the same shortcut is handled in the composer as well and its propabation was not stopped. This means that a user wanting to loop the references inside their formula could see some unexpected side effects due to the grid replaying some commands.

Task: 3916488

Description:

description of this task, what is implemented and why it is implemented that way.

Task: : TASK_ID

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

Footnotes

  1. https://github.com/odoo/o-spreadsheet/issues/2126

Since pull request 2126[^1], the shortcut F4 is handled by the grid
component. Unfortunately, the same shortcut is handled in the composer
as well and its propabation was not stopped. This means that a user
wanting to loop the references inside their formula could see some
unexpected side effects due to the grid replaying some commands.

[^1]: #2126

Task: 3916488
@robodoo
Copy link
Collaborator

robodoo commented May 13, 2024

this.env.model.dispatch("CYCLE_EDITION_REFERENCES");
this.processContent();
ev.stopPropagation();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whenever it's possible, I prefer to have functions like stopPropagation, preventDefault, ... in the beginning of the function. But it's a personal preference, feel free to ignore

Copy link
Collaborator

@LucasLefevre LucasLefevre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

robodoo r+

robodoo pushed a commit that referenced this pull request May 15, 2024
Since pull request 2126[^1], the shortcut F4 is handled by the grid
component. Unfortunately, the same shortcut is handled in the composer
as well and its propabation was not stopped. This means that a user
wanting to loop the references inside their formula could see some
unexpected side effects due to the grid replaying some commands.

[^1]: #2126

closes #4201

Task: 3916488
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
@robodoo robodoo closed this May 15, 2024
@fw-bot fw-bot deleted the saas-16.3-fix-f4-handle-rar branch May 29, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants