Access4all / EPUB

3 stars 1 forks source link

Don't break default right-click workflow #56

Open jmuheim opened 9 years ago

jmuheim commented 9 years ago

You offer context menus at different places in your editor.

It's highly recommended not to break default behaviour, your users will hate it!

I recommend putting a small icon next to (e.g.) the link, that should support a context menu, and left-clicking on it would open the context menu.

qtnc commented 9 years ago

You can always open the default context menu of the browser by maintaining Shift and/or Ctrl. I see two problems with the icon you are proposing :

  1. Keyboard access: the nice thing with the standard conext menu is that it is keyboard accessible with standard keys, i.e. app key or Shift+F10. I will need to invent non-standard key to accccess the context menu if it is done via an icon and it may be unintuitive.
  2. This icon will be in the WYSIWYG area but should be non-editable. I have tried contenteditable=false nested inside contenteditable=true but it doesn't work properly on all browsers (IE, firefox). Additionally, this icon has to be present while editing but absent when the document is saved. This make it not so simple to get the real innerHTML to save then.
jmuheim commented 9 years ago

I still think you shouldn't override the default behaviour as you'll never know how other clients will play with it; e.g. what about iOS that doesn't have a right click?

Anyway, at least a small notice about shift and ctrl should be presented somewhere.

qtnc commented 9 years ago

I still think you shouldn't override the default behaviour as you'll never know how other clients will play with it; e.g. what about iOS that doesn't have a right click?

I don't think people will write a lot of books under iOS; however you get a point.

What about double click ? it's not really standard, so probably it isn't better, I would also need to indicate it somewhere. And with double-click we have then a problem for keyboard-only users.