easy-markdown-editor: Submenu actions not working in Chromium Browsers

Describe the bug If an action is assigned to a button in an submenu, this action is not called, when the button is clicked.

To Reproduce Steps to reproduce the behavior:

  1. Define a submenu, for example:
{
  name: 'FileMenu',
  className: 'ma ma-file',
  title: 'File',
  children: [
    {
      name: 'Save',
      action: saveFile,
      className: 'ma ma-save',
      title: 'Save'
    },
    {
      name: 'New',
      action: newFile,
      className: 'ma ma-new',
      title: 'New'
    }
  ]
},...
  1. Define a function newFile, for example:
function newFile() {
  console.log("test");
}
  1. Load the example and click on File > New
  2. Check the browser console
  3. No output on console is shown in Google Chrome, Chromium, Edge or similar browser. It is working however in Firefox.

Expected behavior In Broser console the output “test”

** Version information **

  • OS: Windows 10
  • Browser: Chrome 95, Chromium 95, Edge 95
  • EasyMDE version: 2.15.0

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 22 (7 by maintainers)

Commits related to this issue

Most upvoted comments

@lonaru The dropdown buttons .easymde-dropdown has an i element inside for the icon. The i needs a tabIndex attribute (I guess value -1) and some styles to remove the blue focus ring from the icon. After this, the :focus-within pseudo-selector seems to work on Safari too.

Please confirm this is fixed in version 2.15.1-10.0.

I’ll deploy 2.16.0 once we know for sure this has solved the issue.