Review main Merged

50954[BUGFIX] Fix RTE in Inline Elements

Helmut Hummel CR +2 V +2 Easy +1 −1 updated 12/14/16, 22:16

Commit message

HTMLArea needs a global JavaScript variable to work correctly.
Before the change done for #77600, this variable was always initialized
by including a JS file when any backend editing form was rendered.

In this mentioned cleanup, this initialization code was moved to
the place where the RTE is actually rendered. But because this can
also happen in an Ajax request, where the needed JS calls are returned
as array and evaluated line by line with `eval`, the code to initialize
the global variable did not work, because it was prefixed with `var`

This lead to a JS error at a later point where the global var is accessed.

To fix this, we force to set/ initialize the global variable, by prefixing
it with the "super global" object `window`. Now the global `HTMLArea` variable
is also initialized when this code is executed in a `eval` context,
when loading RTE fields of IRRE records via Ajax.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 1