question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[docs] Explain the hovering-menu example

See original GitHub issue

Can someone please explain the hovering-menu example? I am primarily interested in how a new selection is detected in order to show/hide the menu. I am not seeing any mouse handling code, so wondering what is triggering the updateMenu() function.

Also why does HoveringMenu capture the initialValue in state? Is the state being continuously updated as the user type into the editor?

My goal is to use Material-UI’s Popper component to create the hover-menu. They have a similar example here. I just need to know how to hook it up to Slate.

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
randallagordoncommented, Oct 15, 2019

For anyone coming through who can’t jump into the Slack for any reason, be sure the buttons in your toolbar are bound to onMouseDown rather than onClick and to call preventDefault on the event so that the button itself doesn’t end up grabbing focus.

0reactions
nareshbhatiacommented, Sep 6, 2019

Thanks, @CameronAckermanSEL. Will do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Create a Hoverable Dropdown Menu - W3Schools
The :hover selector is used to show the dropdown menu when the user moves the mouse over the dropdown button. Right-aligned dropdown. Example....
Read more >
hover - CSS: Cascading Style Sheets - MDN Web Docs
The :hover CSS pseudo-class matches when the user interacts with an element with a pointing device, but does not necessarily activate it.
Read more >
Create Drop-down Menus for a Touch Screen - Amazon Silk
On a desktop browser, the drop-down menus unfold on hover, and you follow links by clicking. Thus, the menus are navigable on both...
Read more >
Bootstrap Hover effects - examples & tutorial
MDB hover effect appears when the user positions the computer cursor over an element without activating it. Hover effects make a website more...
Read more >
Drop Down menus | Working with menus - Drupal
What is a drop down menu? · A drop down menu is useful because it reveals the contents of a website simply by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found