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

NormalMode: <Enter> bleeding through and modifying bullet name before zoom in. #30

Open
awillats opened this issue Apr 21, 2023 · 3 comments

Comments

@awillats
Copy link

In normal mode, zooms into a node, but I've noticed recently it's modifying the node names. My guess as to what's happening is somehow the enter keypress is "bleeding through" and splitting / overwriting whatever was under the cursor in normal mode.

I hadn't noticed this happening before, so not sure if it's related to the March 20th changes.
Poking around, it seems like it might be related to

Enter: e =>
{
const focusedItem = WF.focusedItem();
if(e.shiftKey && focusedItem)
{
goToInsertMode();
return;
}
PrevEnterItem = WF.currentItem();
if(focusedItem)
{
// console.log("transparent Enter (NORMAL) valid focus");
e.preventDefault()
e.stopPropagation()
// WF.zoomIn(focusedItem);
WF.zoomTo(focusedItem);
WF.editItemName(focusedItem);
}
else
{
// WF.zoomIn(WF.currentItem());
WF.zoomTo(WF.currentItem());
WF.editItemName(WF.currentItem());
}
},

specifically:
e.preventDefault()
e.stopPropagation()

Also looks like there was some mention of bleed through / not stopping propagation previously here:
eaa4596

ZoomIn (ctrl-l) and ZoomOut (ctrl-h) now zoom instantly. The zoom animation was causing input to bleed through - even though event.preventDefault() and event.stopPropagation() was being called.

@awillats
Copy link
Author

I've trying rolling back to some other recent commits (dcbb385, 9da44aa) , and I still have the same issue, so maybe it's a change on the WF side or with Chrome?

@Wojnach
Copy link
Owner

Wojnach commented May 9, 2023

I suspect that they are adding their event listeners, for their bindings, sooner then Vimflowy does now, and because of that we can't stop the propagation from bubbling up.

I took a look yesterday but couldn't come up with a quick fix. Gonna give it another try later when I find time.

@Wojnach
Copy link
Owner

Wojnach commented May 10, 2023

pushed a temp fix for the Enter binding cases for now

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

No branches or pull requests

2 participants