Skip to content

Commit 3193f9b

Browse files
committed
[FIX] GridOverlay: Prevent mousedown default when selecting range
When selecting a range in the grid and the composer is open, passing your selection around the composer will see its content selected as if we were actually selecting text inside the composer. This behaviour is a direct effect of the default behaviour of the mousedown event that starts the selection. Since the focus is kept on the composer at all times, the browser behaves as if we had clicked on the composer itself even if from a user point of view, it makes little sense. closes #7493 Task: 5344285 Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
1 parent 8564f98 commit 3193f9b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/grid_overlay/grid_overlay.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ export class GridOverlay extends Component<Props, SpreadsheetChildEnv> {
228228
// not main button, probably a context menu
229229
return;
230230
}
231+
ev.preventDefault();
231232
const [col, row] = this.getCartesianCoordinates(ev);
232233
this.props.onCellClicked(col, row, {
233234
expandZone: ev.shiftKey,

0 commit comments

Comments
 (0)