Closed Bug 259011 Opened 20 years ago Closed 20 years ago

Textfield keybindings busted in GTK1 builds

Categories

(Core :: Layout: Form Controls, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: bryner)

Details

(Keywords: fixed-aviary1.0, fixed1.7.5, regression)

Attachments

(1 file)

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.
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?
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?
(In reply to comment #5)
> That way the "derived" binding would win out, right?
Hu, well thought.
Flags: blocking1.8a4?
Flags: blocking1.7.x?
Attached patch patchSplinter Review
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.
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+
landed on trunk, aviary, and 1.7
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Flags: blocking1.8a4?
Flags: blocking1.7.x?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: