Commit bd275b4
committed
[FIX] html_editor, *: disable add button when video URL is empty
*=website
Steps to reproduce:
1. Drop a video
2. Reopen the media dialog
3. Remove the URL
4. Confirm
Issue:
When the URL was removed and confirmed, an iframe without a valid
source was saved, leading to a 404 error.
Fix:
When the video URL is cleared, VideoSelector component calls selectMedia
with an empty object. MediaDialog did not previously handle this case,
so the media selection was not cleared. Now we Update MediaDialog to
treat an empty object as a clear-selection signal and disable the Add
button accordingly.
task-5190485
closes odoo#239668
X-original-commit: 4602d48
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Dhruv Chauhan (chdh) <chdh@odoo.com>1 parent ebf2025 commit bd275b4
File tree
2 files changed
+44
-0
lines changed- addons
- html_editor/static/src/main/media/media_dialog
- website/static/tests/tours
2 files changed
+44
-0
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
282 | 287 | | |
283 | 288 | | |
284 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
41 | 80 | | |
42 | 81 | | |
43 | 82 | | |
| |||
0 commit comments