Closed rtoy closed 3 years ago
Please explain in more detail.
Sorry about that! I entered the details on the sourceforge bug, but forgot to do that here.
I'm using Chrome 88.04324.0 (beta) and Firefox 85.0b4 on Linux.
Visit, say, https://sourceforge.net/p/forge/site-support/21689/ and enter a comment. (Need an account, I think.)
Press preview. Everything you type gets replaced by just the first character. I haven't used withExEditor yet in any way, except that it's enabled for both chrome and firefox. withExEditor works on every other site I tried that has an editable box that withExEditor can recognize.
Press preview again to enable writing. The original message is there (usually). Then submit. The actual message is what the preview showed.
But when I use an incognito window, this doesn't happen and the text is correctly submitted to the bug.
I don't know if this ever worked before. It's been a long time since I entered anything in sourceforge, and that was probably long before I started using withExEditor.
I have some more questions.
I'm using Chrome 88.04324.0 (beta) and Firefox 85.0b4 on Linux.
Is this issue happening in both Chrome and Firefox?
Visit, say, https://sourceforge.net/p/forge/site-support/21689/ and enter a comment. (Need an account, I think.)
I don't have a SourceForge account, so I can't check it at this time. Can you provide a screenshot or something?
Press preview again to enable writing. The original message is there (usually). Then submit. The actual message is what the preview showed.
You mean that the actual message is a replaced character, right? For example, suppose your input is:
Foo bar
Baz
But submitted message is
F b
B
But when I use an incognito window, this doesn't happen and the text is correctly submitted to the bug.
What happens if you enabled the extension in incognito window? Firefox:
Allow
in Run in Private Windows
Chrome:
chrome://extensions/
Detail
button of withExEditorAllow in incognito
Yes, this is happening with both Firefox and Chrome versions I'm using. What I'm seeing is if I enter
This is a comment
the preview shows
T
What actually happens seems to depend on the number of lines and other things I don't understand.
I also just noticed that at the bottom of the input box, there are counters for lines, words, and something else. These aren't getting updated. In an incognito window, these are updated correctly.
Enabling withExEditor for a private window in Firefox shows the same broken behavior. The lines/words aren't being updated, and the preview is messed up.
I'll try to get a video of this soon.
Here's a video using Firefox. Note that the lines/words never gets updated. This is different from when I use a private window where lines/words is updated and the preview shows what I typed.
https://user-images.githubusercontent.com/663356/103583287-53069a00-4e94-11eb-8163-96e29b6aaed7.mp4
Confirmed
Note: It seems that sourceforge is using Ionaru/easy-markdown-editor: EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
But I don't see any issue when writing text in the demo site.
You're right. The demos work just fine. I don't know what Sourceforge is doing that makes it not work for me. It seems unlikely they'll do anything since they closed the bug right after I mentioned that an incognito window worked.
Some additional information. I forgot I had the Edit with Emacs extension on chrome. When I add the same extension for Firefox and try to edit a bug entry, the emacs buffer shows:
<pre class=" CodeMirror-line " role="presentation"><span role="presentation">asd asd asdf asdf as sadf </span></pre>
(The random asdf is stuff that I had already typed into the buffer.)
If enter test inside the <span>
, and save it, the area has the text I entered. Bu preview doesn't include the new text. And when I try to edit in the buffer, the new text disappears.
Perhaps this is a hint as to why withExEditor isn't working.
Some more info. When I inspect the element I see:
<div ... edit_contenteditable="true">
<pre class=" CodeMirror-line " ...>
<span role="presentation">asdf asdf</span>
</pre>
...
</div>
There's a <pre>
and <span>
for each line. This differs from the EasyMDE Demo where the editable area is just a <textarea>
.
So it's not just withExEditor that has a problem. Edit with Emacs is also confused, but at least I can enter things without mangling, but it can't edit the area either.
So it's not just withExEditor that has a problem. Edit with Emacs is also confused, but at least I can enter things without mangling, but it can't edit the area either.
I don't know what SourceForge is doing internally, but first of all, I have no idea why it is conflicting with withExEditor. withExEditor adds some event listeners such as keydown and mousedown, but it only does the internal processing and does nothing on the actual web page.
At the moment, the only workaround I can think of is to disable the extension on sourceforge.net. How does this sound?
First, thanks so much for looking in to this. I really appreciate it.
Disabling sourceforge.net is acceptable to me. And it works great. If I really need to, I can use Edit with Emacs, but I prefer withExEditor.
I am satisfied with this solution. Feel free to close this issue as fixed.
Oops. Didn't mean to actually close this (because I said "close" in the comment?), but I'm satisfied with this solution.
I think I found the cause. Reopened. I'll file another PR and a try build later.
I have confirmed that the problem has been fixed. I'll merge the PR
Sorry for not getting a chance to try out your fix sooner.
Thanks so much for fixing this. I can confirm that it works now.
I filed this report sourceforge report https://sourceforge.net/p/forge/site-support/21689/ where entering any text into the edit window and submitting produces a mangled comment.
Works fine in incognito window. Did some experiments and disabled all extensions except withExEditor. Still mangles the message. When I disable withExEditor (and reload firefox), comments are working fine.
Don't know if this is a problem with sourceforge or with withExEditor, but I thought I'd report here as well.