Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newline added when toggling back and forth between markdown preview and edit mode in gmail #295

Closed
joelostblom opened this issue Aug 12, 2015 · 8 comments

Comments

@joelostblom
Copy link

Hi,
When I am using Markdown Here (v2.11.8) for authoring gmail messages and switch back to edit mode after previewing, a newline is added on the top of the message. Keeping switching back and forth between preview and edit causes one more newline to be added each time, pushing the text of the message downwards.

I didin't experience this behavior when I tested on a couple of other sites so maybe the problem is gmail specific. I am using gmail in a separate app window on Ubuntu 15.04, Chromium 43.0.2357.130.

@adam-p
Copy link
Owner

adam-p commented Aug 15, 2015

Do you use a custom font? See #236

@joelostblom
Copy link
Author

Nope, I use the standard gmail sans serif font.

On Sat, Aug 15, 2015 at 4:11 PM, Adam Pritchard notifications@github.com
wrote:

Do you use a custom font? See #236
#236


Reply to this email directly or view it on GitHub
#295 (comment)
.

@ianjanicki
Copy link

I have the same problem. Using unformatted font. Mine does not push the text farther down the page with each toggle as @joelostblom describes, it just consistently pushes the text to the second line with each toggle.

When I put my cursor at the beginning of my rendered message and try to press delete to remove the line, it does not allow me to do so. It's like there is a frozen line in the rendered view.

Screencast: https://www.dropbox.com/s/bnhnncypo1dff20/markdown%20here%20bug.mov?dl=0

@adam-p
Copy link
Owner

adam-p commented Aug 25, 2015

@ianjanicki: The single empty line was fixed with #243. For the fix to take effect, you need to reset your Primary Styling CSS.

@joelostblom: Can you capture the HTML of your message both before and after rendering, and after rendering multiple times? An explanation of how to copy the HTML is shown here. Thanks.

@joelostblom
Copy link
Author

Every time I untoggle Markdown Here, the following segment is added before the raw message:
<div class="gmail_default" style="font-family: arial, helvetica, sans-serif;">​​</div>

After toggling back and forth a few times, I end up with the html shown in the image below. The message is in the very last segment.
image

Curiously, this behaviour is only present when using the shortcut Ctrl-Alt-m to toggle Markdown Here. When I right click and toggle no newline is added.

@joelostblom
Copy link
Author

Just reproduced this behavior on another computer running Windows 10 and Chrome.

@adam-p
Copy link
Owner

adam-p commented Sep 18, 2015

I'm pretty sure you have Gmail configured to use a specific font. You can disable it by going into the Gmail settings and clicking this button:

image

Like, you're using the basically-default sans-serif font, but it's still configured, rather than the actual "no specific font" default. Try disabling it and seeing if the blank line thing still happens.

@joelostblom
Copy link
Author

Ah ok, you are right. After clicking 'remove formatting' and saving it works even though it still says I am using Sans Serif and the text looks the same. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants