Fix tag editor preview jumping

This commit is contained in:
Gregory Schier 2018-07-19 16:16:06 -04:00
parent 285e77dc8f
commit a65dd6a37e
2 changed files with 7 additions and 4 deletions

View File

@ -631,10 +631,15 @@ class TagEditor extends React.PureComponent<Props, State> {
let previewElement;
if (error) {
previewElement = (
<textarea className="danger" value={error || 'Error'} readOnly />
<textarea
className="danger"
value={error || 'Error'}
readOnly
rows={5}
/>
);
} else if (rendering) {
previewElement = <textarea value="rendering..." readOnly />;
previewElement = <textarea value="rendering..." readOnly rows={5} />;
} else {
previewElement = (
<textarea value={preview || 'error'} readOnly rows={5} />

View File

@ -1,7 +1,5 @@
module.exports.requestHooks = [
context => {
const requestId = context.request.getId();
// Delete cached values we prompt again on the next request
context.store.clear();
}