Closed
Bug 966612
Opened 11 years ago
Closed 11 years ago
Escape key should exit Print Preview
Categories
(Toolkit :: Printing, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
Tracking | Status | |
---|---|---|
firefox26 | --- | affected |
firefox27 | --- | affected |
firefox28 | --- | affected |
firefox29 | --- | affected |
firefox-esr24 | --- | unaffected |
People
(Reporter: peter, Assigned: masayuki)
References
Details
(Keywords: regression)
Attachments
(2 files, 1 obsolete file)
3.19 KB,
patch
|
enndeakin
:
review+
|
Details | Diff | Splinter Review |
2.82 KB,
patch
|
enndeakin
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0 (Beta/Release)
Build ID: 20131206152142
Steps to reproduce:
step 1. Click 'Print preview' > shows preview screen.
step 2. Press Esc >
Actual results:
step 1. preview screen shown
step 2. no response
Expected results:
step 2. should close preview screen
Comment 1•11 years ago
|
||
Regression window(m-i)
Good:
http://hg.mozilla.org/integration/mozilla-inbound/rev/12c11406ed75
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20130724 Firefox/25.0 ID:20130724230740
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/949a5e125a8d
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20130724 Firefox/25.0 ID:20130724230940
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=12c11406ed75&tochange=949a5e125a8d
Regressed by: Bug 501496
Blocks: 501496
Status: UNCONFIRMED → NEW
Component: Untriaged → Event Handling
Ever confirmed: true
Keywords: regression
OS: Linux → All
Product: Firefox → Core
Version: 26 Branch → 25 Branch
Updated•11 years ago
|
status-firefox26:
--- → affected
status-firefox27:
--- → affected
status-firefox28:
--- → affected
status-firefox29:
--- → affected
status-firefox-esr24:
--- → unaffected
Assignee | ||
Comment 2•11 years ago
|
||
Hmm, I'm surprised that nobody has already reported this!?
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Assignee | ||
Updated•11 years ago
|
Component: Event Handling → Printing
Product: Core → Toolkit
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Comment 4•11 years ago
|
||
Assignee | ||
Comment 5•11 years ago
|
||
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 8369332 [details] [diff] [review]
part.1 Print preview should handle Esc key with keydown event
Non-printable key should be handled at keydown event because preventDefault() of non-printable key's keydown event is called by nsPrintPreviewListener, then, following keypress event won't be fired.
On the other hand, charCode is set only when the event is keypress event. Therefore, PrintUtils needs to handle both keydown event and keypress event. The former is for handling Esc key (non-printable key). The latter is for Ctrl + "w" (printable key).
Attachment #8369332 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 7•11 years ago
|
||
Comment on attachment 8369333 [details] [diff] [review]
part.2 Add tests on printpreview UI
Test for this bug and bug 940843.
Attachment #8369333 -
Flags: review?(gavin.sharp)
Updated•11 years ago
|
Attachment #8369332 -
Flags: review?(gavin.sharp) → review?(enndeakin)
Updated•11 years ago
|
Attachment #8369333 -
Flags: review?(gavin.sharp) → review?(enndeakin)
Comment 9•11 years ago
|
||
Comment on attachment 8369332 [details] [diff] [review]
part.1 Print preview should handle Esc key with keydown event
I'm not clear why the two event handlers are combined. The keypress event listener could be left as is (or the escape key part removed) and then just add a new keydown listener:
onKeyDown: function(aEvent)
{
if (aEvent.keyCode == aEvent.DOM_VK_ESCAPE) {
PrintUtils.exitPrintPreview();
}
}
Attachment #8369332 -
Flags: review?(enndeakin) → review-
Updated•11 years ago
|
Attachment #8369333 -
Flags: review?(enndeakin) → review+
Assignee | ||
Comment 10•11 years ago
|
||
Attachment #8369332 -
Attachment is obsolete: true
Attachment #8370550 -
Flags: review?(enndeakin)
Comment 11•11 years ago
|
||
Comment on attachment 8370550 [details] [diff] [review]
part.1 Print preview should handle Esc key with keydown event
+ // XXX Why don't we call aEvent.preventDefault() here?
+ }
Likely because ctrl+w needs to be prevented to stop the window from closing, but escape doesn't have any default behaviour or listeners higher up.
Attachment #8370550 -
Flags: review?(enndeakin) → review+
Assignee | ||
Comment 12•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/5959f80e1831
https://hg.mozilla.org/integration/mozilla-inbound/rev/993ddadafaea
Thank you. I removed the XXX comment at landing.
Comment 13•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/5959f80e1831
https://hg.mozilla.org/mozilla-central/rev/993ddadafaea
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•