[WYSIWYG]画像ダイアログの詳細タブで保存すると画像がリサイズされない問題を修正しました #1962
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
概要
詳細設定タブで保存ボタンを押すと、パラメータに画像サイズが設定されないのが原因でした。
下記コードで値を設定していましたが、詳細設定タブを開くと一般タブの要素はすべて入れ替わるため、値を設定できていませんでした。
document.getElementById('cc-resized-image-size-' + frame_id).value = jQuery('.tox-listbox--select')[0].dataset.value
そこで、以下のように修正しました。
document.getElementById('cc-resized-image-size-' + frame_id).value = event.value.resize;
併せて、TinyMCEのコードも修正し、event.valueに画像サイズのデータを追加しました。
この修正により詳細設定タブでも画像サイズがサーバーに送信されます。
レビュー完了希望日
関連Pull requests/Issues
#1961
参考
DB変更の有無
無し
チェックリスト