Closed Bug 402766 Opened 17 years ago Closed 17 years ago

use keyDown: instead of pKE: for back/forward key commands

Categories

(Camino Graveyard :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED WONTFIX

People

(Reporter: jaas, Assigned: jaas)

References

Details

Attachments

(1 file, 2 obsolete files)

2.35 KB, patch
stuart.morgan+bugzilla
: review+
Details | Diff | Splinter Review
Attached patch fix v1.0 (obsolete) — Splinter Review
We should use keyDown: instead of performKeyEquivalent: for back/forward key commands in Camino. That way event propagation matches up with expected behavior - Gecko gets a chance to handle the event before Camino has to decide what to do without depending on Gecko to call interpretKeyEvents in pKE:.
Attachment #287582 - Flags: review?(stuart.morgan)
Assignee: nobody → joshmoz
Comment on attachment 287582 [details] [diff] [review]
fix v1.0

oops, forgot to add back the part that requires the command key to be down!
Attachment #287582 - Attachment is obsolete: true
Attachment #287582 - Flags: review?(stuart.morgan)
Attached patch fix v1.1 (obsolete) — Splinter Review
Attachment #287583 - Flags: review?(stuart.morgan)
Comment on attachment 287583 [details] [diff] [review]
fix v1.1

This doesn't distinguish between "Command-arrow" and "Command-anythingelse-arrow"

Also, why was this moved down into BCV?
Attachment #287583 - Flags: review?(stuart.morgan) → review-
Attached patch fix v1.2Splinter Review
Attachment #287583 - Attachment is obsolete: true
Attachment #287640 - Flags: review?(stuart.morgan)
Comment on attachment 287640 [details] [diff] [review]
fix v1.2

r=me with a high-level comment explaining that this is to map command-arrow to forward/back, and explaining that we are deliberately using keyDown: rather than pKE: to make sure that text field/IME behavior wins (lest some future developer decide to "simplify" this code to pKE: without thinking about the behavioral side effect)
Attachment #287640 - Flags: review?(stuart.morgan) → review+
Attachment #287640 - Flags: superreview?(mark)
Comment on attachment 287640 [details] [diff] [review]
fix v1.2

Hopefully we'll just kill off this feature, see bug 379199 comment 24.
Attachment #287640 - Flags: superreview?(mark)
Sam Sidler pointed out that command-arrow is a feature in Firefox, I'm not sure how they do that. If I had to guess I'd guess that they decide whether or not to invoke back/forward based on whether some form of text input has focus. If that is true, then Camino should intercept the key event before gecko gets it, see if Gecko has text input focused, and if so pass the event on to gecko otherwise invoke back/forward. That would work and does not rely on propagating events that might have been handled. Just a little trickier to code.
That's a good point, and it actually wouldn't be too hard to do since we already have code for determining if textfields are focused for some similar issues.
This no longer makes sense per our evolving discussion on key event handling, so WONTFIXing in favor of bug 405744, which is the current plan based on comment 7.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: