Commit f3c971e
committed
[FIX] web: ignore !important % width/height on dragged elements
This commit fixes an issue in draggable_hook_builder where elements with
!important percentage-based width or height styles would be incorrectly
sized when dragged. The sizing would be computed relative to the document
rather than the style computed by the hook.
To address this, the hook now applies max-width and max-height styles
explicitly. This helps enforce correct sizing and prevents !important
rules from interfering with the visual consistency of dragged elements.
The issue was first spotted in the actions kanban view present in the
automation rules form view.
task-4891808
closes odoo#220565
X-original-commit: fd2dee1
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>1 parent 66265b4 commit f3c971e
2 files changed
Lines changed: 15 additions & 7 deletions
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
503 | | - | |
504 | | - | |
| 503 | + | |
| 504 | + | |
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
510 | | - | |
511 | | - | |
| 510 | + | |
512 | 511 | | |
513 | 512 | | |
514 | 513 | | |
| |||
525 | 524 | | |
526 | 525 | | |
527 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
528 | 530 | | |
529 | 531 | | |
530 | 532 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
| 344 | + | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
| 347 | + | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
366 | 367 | | |
367 | 368 | | |
368 | 369 | | |
| |||
384 | 385 | | |
385 | 386 | | |
386 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
387 | 393 | | |
388 | 394 | | |
389 | 395 | | |
| |||
0 commit comments