Fix EasyMDE error when input Enter#19004
Merged
Merged
Conversation
zeripath
approved these changes
Mar 4, 2022
silverwind
approved these changes
Mar 4, 2022
silverwind
reviewed
Mar 4, 2022
| const tributeContainer = document.querySelector('.tribute-container'); | ||
| if (!tributeContainer || tributeContainer.style.display === 'none') { | ||
| return window.CodeMirror.Pass; | ||
| cm.execCommand('newlineAndIndent'); |
Contributor
Author
There was a problem hiding this comment.
CodeMirror.Pass exists, while cm = CodeMirror(...); cm.Pass doesn't exist.
I have read through the EasyMDE and CodeMirror code, it's impossible to access CodeMirror.Xxx in Gitea now.
Member
There was a problem hiding this comment.
Fine I guess if the end result is the same.
Contributor
Author
There was a problem hiding this comment.
It is the same. CodeMirror document said: the default command for Enter is newlineAndIndent.
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Mar 6, 2022
* giteaofficial/main: Fix EasyMDE error when input Enter (go-gitea#19004) Fix update hint bug (go-gitea#18996) Fix the editor height in review box (go-gitea#19003) Add a "admin user generate-access-token" subcommand (go-gitea#17722) Fix potential assignee query for repo (go-gitea#18994) Add config option to disable "Update branch by rebase" (go-gitea#18745) Update `go-enry` to v2.8.0 (go-gitea#18993) homebrew updates via cron ignore missing comment for user notifications (go-gitea#18954) allow overwrite artifacts for github releases (go-gitea#18987) fix & refactor (go-gitea#18973)
Chianina
pushed a commit
to Chianina/gitea
that referenced
this pull request
Mar 28, 2022
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PR #18911 removes global
window.CodeMirror, now when input Enter in EasyMDE, there is an error (window.CodeMirror.Pass):This PR fixes the error.