Textfield keybindings busted in GTK1 builds

RESOLVED FIXED

Status

()

Core
Layout: Form Controls
--
major
RESOLVED FIXED
13 years ago
12 years ago

People

(Reporter: bz, Assigned: Brian Ryner (not reading))

Tracking

({fixed-aviary1.0, fixed1.7.5, regression})

Trunk
x86
Linux
fixed-aviary1.0, fixed1.7.5, regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

The patch for bug 257405 broke Emacs keybindings in GTK1 builds.

STEPS TO REPRODUCE:

1)  Load http://bugzilla.mozilla.org/enter_bug.cgi?product=Browser
2)  Type "This is a test" in the textarea
3)  Hit Ctrl-a

EXPECTED RESULTS:  caret goes to beginning of line

ACTUAL RESULTS:  all text is selected.

This is a pretty major usability regression (since there is no way to undo this
change in GTK1 builds, unlike GTK2 ones).
The reason this broke is that xbl/builtin/unix/platformHTMLBindings.xml ends up
with something along the lines of:

  <handler event="keypress" key="a" command="cmd_selectAll" modifiers="accel"/>
  <handler event="keypress" key="a" modifiers="control" command="cmd_beginLine"/>

I suspect XBL ignores the second handler, since there is a handler already
defined for that key/accel combination.

Before, the second handler was defined in a binding that extended the binding
with the first handler, so it overrode the handler from the parent binding... 
We probably need to go back to that setup.

Comment 2

13 years ago
Another possibility is to move the "select_all" handlers out of the include
files and add them to the win/mac/unix platform handlers.
Is select_all the only key that the Unix binding overrode?

Comment 4

13 years ago
win/mac only, I meant.

bz: yeah, there's not a lot of ctrl-ASCII shortcuts in the .inc files:
ctrl-A,C,V,X,Z,shift-Z. The emacs ctrl-Z (minimize) and ctrl-V (scroll) bindings
have never been implemented in gtk1.
Maybe the right approach is to move the inc to after the handlers of the
"derived" binding.  That way the "derived" binding would win out, right?

Comment 6

13 years ago
(In reply to comment #5)
> That way the "derived" binding would win out, right?
Hu, well thought.
Flags: blocking1.8a4?
Flags: blocking1.7.x?
(Assignee)

Comment 7

13 years ago
Created attachment 158782 [details] [diff] [review]
patch

This actually makes the most sense to me.  Since ctrl+a for select all is not
actually a "common" keybindings, I removed it from the .inc file and added it
to the platform keybindings for mac and windows.
(Assignee)

Updated

13 years ago
Attachment #158782 - Flags: superreview?(bzbarsky)
Attachment #158782 - Flags: review?(bzbarsky)
Comment on attachment 158782 [details] [diff] [review]
patch

Yeah, if this is the only key that was overridden... r+sr=bzbarsky
Attachment #158782 - Flags: superreview?(bzbarsky)
Attachment #158782 - Flags: superreview+
Attachment #158782 - Flags: review?(bzbarsky)
Attachment #158782 - Flags: review+
(Assignee)

Comment 9

13 years ago
landed on trunk, aviary, and 1.7
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Keywords: fixed-aviary1.0, fixed1.7.x
Resolution: --- → FIXED

Updated

13 years ago
Flags: blocking1.8a4?
Flags: blocking1.7.x?
You need to log in before you can comment on or make changes to this bug.