Closed bielu closed 1 month ago
@rickbutterfield I have investigated it and it could be solved easily by changing:
function loadPreview(content, settings) {
$scope.markup = $sce.trustAsHtml('<div class="preview-alert preview-alert-info">Loading preview</div>');
$scope.loading = true;
var formattedBlockData = {
layout: $scope.block.layout,
contentData: [content || $scope.block.data],
settingsData: [settings || $scope.block.settingsData]
};
previewResource.getPreview(formattedBlockData, $scope.id, $scope.blockEditorAlias, $scope.model.constructor.name == 'BlockGridBlockController', $scope.language).then(function (data) {
$scope.markup = $sce.trustAsHtml(data);
$scope.loading = false;
});
}
loadPreview($scope.block.data, $scope.block.settingsData);
to
function loadPreview(content, settings) {
var formattedBlockData = {
layout: $scope.block.layout,
contentData: [content || $scope.block.data],
settingsData: [settings || $scope.block.settingsData]
};
previewResource.getPreview(formattedBlockData, $scope.id, $scope.blockEditorAlias, $scope.model.constructor.name == 'BlockGridBlockController', $scope.language).then(function (data) {
$scope.markup = $sce.trustAsHtml(data);
$scope.loading = false;
});
}
$scope.markup = $sce.trustAsHtml('<div class="preview-alert preview-alert-info">Loading preview</div>');
$scope.loading = true;
loadPreview($scope.block.data, $scope.block.settingsData);
Hey @bielu! This was released in 1.9.0, so that or any newer versions will have a fix in!
Which Umbraco.Community.BlockPreview version are you using?
1.8.4
Which Umbraco version are you using? For example: 10.4.0 - don't just write v10
13.2.2
Bug summary
When editing block with live editing enabled it will cause flickering of editor in background.
Steps to reproduce
Add few blocks to block grid modify one (best example when rte is in) and see editor in background is flickering
Expected result / actual result
Editors post loading are not flickering but updating with required changes.