-
Notifications
You must be signed in to change notification settings - Fork 106
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
Linebreak in lists do not work correctly #284
Comments
@dselman const onKeyDown = useCallback((event) => {
if (!canKeyDown(editor, event)) {
const onKeyDown = useCallback((event) => {
if (!canKeyDown(editor, event)) {
event.preventDefault();
return;
}
console.log(event.key);
const isFormatEvent = () => formattingHotKeys.some(hotkey => isHotkey(hotkey, event));
if (!canBeFormatted(editor) && isFormatEvent()) {
event.preventDefault();
return;
}
if (event.key === "Enter" && !isBlockHeading(editor)) {
return;
}
console.log('isFormatEvent',isFormatEvent())
const hotkeys = Object.keys(HOTKEYS);
hotkeys.forEach((hotkey) => {
if (isHotkey(hotkey, event)) {
event.preventDefault();
const { code, type } = HOTKEYS[hotkey];
console.log(code,type);
hotkeyActions[type](code);
}
});
}, [canBeFormatted, canKeyDown, editor, hotkeyActions]); On pressing the Enter key there is no console.log():
|
@K-Kumar-01 That is because of this line here
It basically means that if you are on a non-heading block and you press enter then everything should be ignored. I have detailed this issue and its solution in this pull request here #270 |
@d-e-v-esh Shall I work upon this issue. |
I suspect we hold off on this Issue specifically until #270 is finished and then see where we stand. |
@irmerk Yes, I think that would be the best. |
@irmerk Can you assign it to me please? |
@Hanaffi please see #284 (comment) |
I would like to contribute and fix the issue. |
@dezfuture |
@irmerk |
I believe #270 needs to be finished first. |
@d-e-v-esh can i work on this issue. |
@AbhishekJamhoriya please open a PR if you work on this. |
Can i work on this issue? |
@d-e-v-esh I would like to work on this issue, if it's still open |
is this issue still open ? i want to work on this issue . if it still exists , then please can you assign this issue to me ? |
Bug Report 🐛
When we press Enter in the middle of a sentence inside of a list, instead of pushing the rest of the sentence to the new line, it inserts a new line and then pushes the rest of the sentence to the new line which creates an extra unneeded line that can be very annoying at times for the user.
Expected Behavior
It should push the rest of the text to the next number without inserting an extra new line
Current Behavior
It inserts a new line and then pushes the rest of the paragraph to the next number.
Possible Solution
Steps to Reproduce
Enter
Context (Environment)
Desktop
Detailed Description
Possible Implementation
The text was updated successfully, but these errors were encountered: