Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349485 - [client] Some keybindings block defaults in Firefox
Summary: [client] Some keybindings block defaults in Firefox
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL: https://github.com/eclipse/orion.clie...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-15 14:21 EDT by Mihai Sucan CLA
Modified: 2011-09-01 11:41 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mihai Sucan CLA 2011-06-15 14:21:43 EDT
Build Identifier: 

In Firefox Ctrl-B/I/U do not perform bold/italic/underline, but they open different UI features like bookmarks/page info/view page source.

The default hard-coded set of keybindings in the Orion textview prevents the default action of these three keyboard shortcuts, rendering the Firefox UI features unaccessible by keyboard.

The problem we have in the Orion integration is that for the tools we are working on we want to assign various actions to the three keyboard shortcuts.

Therefore, we would like for these three keyboard bindings to not be setup in Orion by default, in Firefox. Would this be an acceptable solution?

I will submit a minimal patch. Thank you!

Reproducible: Always
Comment 1 Felipe Heidrich CLA 2011-06-15 14:31:39 EDT
Add this lines to your code:
view.setKeyBinding(new mKeyBinding.KeyBinding('b', true), "dontdoit");
view.setKeyBinding(new mKeyBinding.KeyBinding('i', true), "dontdoit");
view.setKeyBinding(new mKeyBinding.KeyBinding('u', true), "dontdoit");
view.setAction("dontdoit", function() {
	return false;
});

Do that and textview will let the user agent see the key.
Comment 2 Felipe Heidrich CLA 2011-06-15 14:42:51 EDT
Note that the real problem here is that textview+editor are taking several shortcuts from the user agent, at some point we need a better design to avoid conflicts between the editor and user agent shortcuts (or ui to allow the user to resolve this conflicts?)
Comment 3 Mihai Sucan CLA 2011-06-15 15:08:15 EDT
As agreed, I am submitting a minimal patch which fixes the issue with the three keyboard shortcuts in Firefox. Github pull request:

https://github.com/eclipse/orion.client/pull/3

Thank you!


(In reply to comment #2)
> Note that the real problem here is that textview+editor are taking several
> shortcuts from the user agent, at some point we need a better design to avoid
> conflicts between the editor and user agent shortcuts (or ui to allow the user
> to resolve this conflicts?)

The wider problem is indeed something that will have to be fixed differently. We currently only use the Orion TextView, not the whole editor component (until the dojo deps removal), so the minor TextView fix is sufficient for now.

For the editor component I would suggest that integrators are given the choice to use predefined keyboard shortcuts ... or not at all, to allow us to define our keybindings as we need.
Comment 4 Felipe Heidrich CLA 2011-06-15 15:29:16 EDT
simon, can you +1 this change ?
Comment 5 Mihai Sucan CLA 2011-06-16 14:46:49 EDT
Just for completeness, here's usual statement:

I confirm that I wrote all this code and have the rights to contribute it to
Eclipse under the eclipse.org web site terms of use.