Vote #79030
完了Preformatted text overflows in preview
0%
説明
If user uses pre in his note and the note has some long text, it overflows over the sidebar on the right.
journals
I should note this happens in the preview panel
--------------------------------------------------------------------------------
It is not preferable that the display at preview is different from the actual display.
I think adding this code will solve this problem.
<pre><code class="diff">
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index e194ccd78..385869fab 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -718,6 +718,7 @@ input#time_entry_comments { width: 90%;}
input#months { width: 30px; }
#preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
+fieldset.preview { min-width: inherit; }
.tabular.settings p{ padding-left: 300px; }
.tabular.settings label{ margin-left: -300px; width: 295px; }
</code></pre>
--------------------------------------------------------------------------------
I confirmed the problem and the patch submitted in #27862#note-2 works fine for me. But I think we can use the existing selector "#preview fieldset" instead of adding "fieldset.preview", don't we?
<pre><code class="diff">
Index: public/stylesheets/application.css
===================================================================
--- public/stylesheets/application.css (revision 17180)
+++ public/stylesheets/application.css (working copy)
@@ -717,7 +717,7 @@
input#time_entry_comments { width: 90%;}
input#months { width: 30px; }
-#preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
+#preview fieldset {margin-top: 1em; min-width: inherit; background: url(../images/draft.png)}
.tabular.settings p{ padding-left: 300px; }
.tabular.settings label{ margin-left: -300px; width: 295px; }
</pre></code>
--------------------------------------------------------------------------------
When using the selector "#preview fieldset", the style was not applied to the preview screen for editing existing notes.
Therefore, I prepared a new selector "fieldset.preview".
--------------------------------------------------------------------------------
Mizuki ISHIKAWA wrote:
> When using the selector "#preview fieldset", the style was not applied to the preview screen for editing existing notes.
Thank you for the explanation, I confirmed what you wrote. I noticed that the preview area when editing an existing note doesn't have "DRAFT" background image. Your patch also fixes that.
Maybe you can put the two lines of CSS together as follows. Mizuki, could you review this?
<pre><code class="diff">
Index: public/stylesheets/application.css
===================================================================
--- public/stylesheets/application.css (revision 17180)
+++ public/stylesheets/application.css (working copy)
@@ -717,7 +717,7 @@
input#time_entry_comments { width: 90%;}
input#months { width: 30px; }
-#preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
+fieldset.preview {margin-top: 1em; min-width: inherit; background: url(../images/draft.png)}
.tabular.settings p{ padding-left: 300px; }
.tabular.settings label{ margin-left: -300px; width: 295px; }
</code></pre>
--------------------------------------------------------------------------------
Go MAEDA wrote:
> I noticed that the preview area when editing an existing note doesn't have "DRAFT" background image. Your patch also fixes that.
>
> Maybe you can put the two lines of CSS together as follows. Mizuki, could you review this?
>
Thank you for fixing the code I wrote.
I confirmed that the code works as expected. This makes it possible to equalize the layout of the preview panel.
--------------------------------------------------------------------------------
I confirmed that the patch also works as expected for news and wiki.
Setting target version to 3.3.7.
--------------------------------------------------------------------------------
Committed. Thank you all for reporting and fixing this issue.
--------------------------------------------------------------------------------
Merged to stable branches.
--------------------------------------------------------------------------------