Closed Bug 314306 Opened 18 years ago Closed 18 years ago

[patch] Can't quit MODI / something's eating Esc in the content area


(Camino Graveyard :: General, defect, P3)



(Not tracked)



(Reporter: alqahira, Assigned: sfraser_bugs)




(Keywords: fixed1.8.1)


(1 file)

When using the Mouseover Document Inspector bookmarklet (above; homepage:, Esc is supposed to cancel the bookmarklet and make it go away (and does, in Fx).  

In Camino, Esc does not cancel MODI.  I suspect something is eating Esc (the other shortcut keys, like p for Pause, do work); bug 310989 seems to indicate Esc gets grabbed somewhere.

Camino 2005102704 (v1.0a1+)
Neat bookmarklet! We should look into this.
Flags: camino1.0?
Esc stops page load. I think that we should only be trapping Esc for this when the page actually is loading, though.
Assignee: mikepinkerton → sfraser_bugs
Severity: minor → normal
Flags: camino1.0? → camino1.0+
Priority: -- → P3
Target Milestone: --- → Camino1.0
Attached patch PatchSplinter Review
The whole -sendEvent thing was a bad idea. The correct way to do this is to implement the NSResponder method -cancel:, which is called when you hit the escape key. That way, we can implement it at the appropriate place in the responder chain.
Attachment #204995 - Flags: review?(mark)
*** Bug 319161 has been marked as a duplicate of this bug. ***
Comment on attachment 204995 [details] [diff] [review]

Nice.  That bookmarklet is really cool.

Why cancel: and not cancelOperation:?
I used cancel because that's what I saw doComamndBySelector: getting called for down in ChildView. If we implement cancelOperation:, I'm not sure that gecko's gonna get first crack at it.
Comment on attachment 204995 [details] [diff] [review]

Both cancel: and cancelOperation: seemed to do the trick for me, I was just curious about your choice of one over the other.  r=me.
Attachment #204995 - Flags: review?(mark) → review+
Unfortunately we have to have a solution that doesn't break 10.2 (like keeping the old sendEvent: hack).
Is bug 289432 related to this (i.e., to our trapping of certain keystrokes at impropper occasions?)
I think that's just because we're not catching it in the sheet, but we're catching it for the "Stop Loading Page" menu item.
Tangentially related: bug 164863, which describes a situation where cmd gets eaten too. (For example, cmd-return won't open a text-selected link at all, let alone in a new tab or window. Return with the link selected works as expected.)

Simon, should we move this to 1.1/Mozilla 1.8.1 (when we won't have to make it work for 10.2)?
Yeah I guess.
Flags: camino1.0+ → camino1.0-
Target Milestone: Camino1.0 → Camino1.1
Blocks: 311840
Summary: Can't quit MODI / something's eating Esc in the content area → [patch] Can't quit MODI / something's eating Esc in the content area
Comment on attachment 204995 [details] [diff] [review]

This still applies, but it has to guess some offsets now.  It'd be nice to get it in soon ;)
Comment on attachment 204995 [details] [diff] [review]

10.2-dropping OK for 1.1.
Attachment #204995 - Flags: superreview+
Checked in on trunk and 1.8 branch for smfr.
Closed: 18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
*** Bug 339811 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.