WordPress / better-code-editing

[✅ Merged into 4.9-alpha] Better Code Editing WordPress plugin
https://wordpress.org/plugins/better-code-editing/
37 stars 16 forks source link

Selecting autocomplete hint options via mouse not reliable #78

Closed westonruter closed 6 years ago

westonruter commented 6 years ago

When you select an autocomplete hint option from the dropdown via mouse, a couple things aren't right:

  1. The list item doesn't have the blue highlight upon hovering or clicking that you get when using arrow keys. This actually seems to be an issue in CodeMirror itself, as if you type o and then ctrl+space at https://codemirror.net/demo/complete.html you likewise do not get the expected item styling when moving the mouse over the dropdown. This actually seems to have been reported previously in https://github.com/codemirror/CodeMirror/issues/4126
  2. Clicking on an autocomplete option causes the editor to blur and then that means we show the syntax error notifications/notices. This should be prevented since the editor will be re-focused immediately afterward. See #69.

Reported by @presskopp.

Presskopp commented 6 years ago

Thank you for opening the ticket, you have the better words on all this. I want to add that when you click an option in the dropdown, it won't be inserted, if your cursor is between { and }. If you only have one { open, it will work.

westonruter commented 6 years ago

Point 2 was fixed in #69. Point 1 is really an upstream issue that needs to be fixed in CodeMirror itself.