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:
- 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'
}
]
},...
- Define a function newFile, for example:
function newFile() {
console.log("test");
}
- Load the example and click on File > New
- Check the browser console
- 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
- update easymde.css, fix issue #362 — committed to robjean9/easy-markdown-editor by robjean9 3 years ago
- fix issue #362 — committed to robjean9/easy-markdown-editor by robjean9 3 years ago
- Merge pull request #364 from robjean9/master update easymde.css, fix issue #362 — committed to Ionaru/easy-markdown-editor by Ionaru 3 years ago
- Attempt at improving submenus in Safari for #362 — committed to Ionaru/easy-markdown-editor by Ionaru 2 years ago
@lonaru The dropdown buttons
.easymde-dropdown
has ani
element inside for the icon. Thei
needs atabIndex
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.