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

Add a timeout for the in-between-inserter for cases where the onmouseout isn't invoked #35536

Closed
jasmussen opened this issue Oct 12, 2021 · 7 comments · Fixed by #36798
Closed
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Type] Bug An existing feature does not function as intended

Comments

@jasmussen
Copy link
Contributor

The in-between inserter shows up when you hover between two blocks, and disappears when you move the cursor out from that area:

inserter

However a number of actions can cause this inserter to linger and stay, presumably because mouse action to fade the inserter out again isn't fired. One easy way to reproduce this is is to use the keyboard shortcut to open the list view, control alt O, while the inserter is present:

lingering quick inserter

Other ways to make the inserter linger is when keyboard shortcuts are used to resize the window, or to invoke the web inspector. It also happens if the viewport resizing gets invoked:

lingering

Quite simply, if you move the mouse out from canvas itself fast enough, it will stay around. Occasionally this can cause horizontal or even double scrollbars to appears, as the canvas size is reduced while a stray sibling inserter lingers in the canvas (#30055).

To address this and fade out the sibling inserter in these cases, can we add a timeout that checks if the mouse is over the sibling inserter, and fade it out if not? Are there other solutions?

@jasmussen jasmussen added [Type] Bug An existing feature does not function as intended [Feature] Inserter The main way to insert blocks using the + button in the editing interface labels Oct 12, 2021
@jameskoster
Copy link
Contributor

In addition to the timeout, would it make sense to hide the in-between-inserter on any keystroke, and any click not directly on the [+]?

@jasmussen
Copy link
Contributor Author

Good thought, yes. Perhaps also on any hover that is outside the canvas.

@jasmussen
Copy link
Contributor Author

Another way to trigger the lingering inserter:

  • Hover between two blocks to invoke the sibling inserter
  • ⌘Tab or Alt Tab to go to a different window, then go back

@jameskoster
Copy link
Contributor

Another one that may be specific to template parts:

inbetween

@ramonjd
Copy link
Member

ramonjd commented Nov 23, 2021

I've been toying around with adding an onFocusOutside to the InsertionPointPopover, then dispatching hideInsertionPoint. Seems like it might be worth trying.

@jasmussen
Copy link
Contributor Author

Definitely seems worth trying. The sibling inserter appears so easily now, that I think we can/should be pretty aggressive in dismissing it as well. Focus/click outside would be a good start, but honestly even hover outside should dismiss it, and that's often not the case now.

@ramonjd
Copy link
Member

ramonjd commented Nov 25, 2021

The inserter is proving to be fickle. While it might not cover all cases described, this might be a start: #36798

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants