8000 Remove "Replace Snippet" overlay button (rip) + Do not scroll to the dropped snippet if it is an inner content + Call prepare_drag resource for snippets too and properly cancel + Scroll to the clone and activate its option only if needed by sobo-odoo · Pull Request #4691 · odoo-dev/odoo · GitHub
[go: up one dir, main page]

Skip to content

Remove "Replace Snippet" overlay button (rip) + Do not scroll to the dropped snippet if it is an inner content + Call prepare_drag resource for snippets too and properly cancel + Scroll to the clone and activate its option only if needed #4691

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

Merged
merged 4 commits into from
May 20, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do not scroll to the dropped snippet if it is an inner content
  • Loading branch information
sobo-odoo committed May 20, 2025
commit ddcb957d6e1b5f30d1ffafb15a107d5275b9ce69
3 changes: 2 additions & 1 deletion addons/html_builder/static/src/sidebar/block_tab.js
9375
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export class BlockTab extends Component {
});

if (snippetEl) {
await scrollTo(snippetEl, { extraOffset: 50 });
await this.processDroppedSnippet(snippetEl);
}
this.state.ongoingInsertion = false;
Expand Down Expand Up @@ -145,6 +146,7 @@ export class BlockTab extends Component {
});

if (selectedSnippetEl) {
await scrollTo(selectedSnippetEl, { extraOffset: 50 });
await this.processDroppedSnippet(selectedSnippetEl);
} else {
this.cancelDragAndDrop();
Expand Down Expand Up @@ -375,7 +377,6 @@ export class BlockTab extends Component {
*/
async processDroppedSnippet(snippetEl) {
this.updateDroppedSnippet(snippetEl);
await scrollTo(snippetEl, { extraOffset: 50 });
// Build the snippet.
for (const onSnippetDropped of this.env.editor.getResource("on_snippet_dropped_handlers")) {
const cancel = await onSnippetDropped({ snippetEl, dragState: this.dragState });
Expand Down
0