silverstripe / cwp

Common Web Platform (CWP) features module. We strongly recommend using it for all new CWP projects. Future features will be delivered here.
https://www.cwp.govt.nz
BSD 3-Clause "New" or "Revised" License
10 stars 26 forks source link

Remote file dialogue doesn't respect custom dimensions #160

Open phptek opened 6 years ago

phptek commented 6 years ago

Versions

PHP 7.1.23

#> composer info | grep cwp/
cwp/cwp                                                  2.1.1              CWP features module. We strongly recommend using it for all new sites. Future features will be delivered here.
cwp/cwp-core                                             2.1.1              CWP basic compatibility module. Use for migrations.
cwp/cwp-pdfexport                                        1.0.1              Add PDF export capability for pages in CWP
cwp/cwp-recipe-cms                                       2.1.1              CWP CMS requirements recipe
cwp/cwp-recipe-core                                      2.1.1              CWP core requirements recipe
cwp/cwp-recipe-search                                    2.1.1              CWP search requirements recipe
cwp/cwp-search                                           1.0.0              CWP fulltextsearch integration module

Issue

Using the "Insert Media via URL" TinyMCE feature, and fetching a remote image, or video; no matter what I put into the "Width" and "Height" user-input form fields, the image's (or video's placeholder image) original dimensions are maintained (as per login in the embed/embed dependency) and my custom ones overridden or ignored.

There is probably a very simple way to fix this in some React component...somewhere.

phptek commented 6 years ago

More info: The moment I type a key while focused in the "Width" field for example, I see a JS TypeError in my console:

TypeError: t.target is undefined[Learn More] from bundle.js in silverstripe/asset-admin.