Last Comment Bug 781956 - <wizard/> : Using advance(pageId) on the last page should not close the wizard
: <wizard/> : Using advance(pageId) on the last page should not close the wizard
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XUL (show other bugs)
: Trunk
: All All
: -- minor (vote)
: mozilla17
Assigned To: Will Nayes [:wnayes]
:
Mentors:
Depends on:
Blocks: Instantbird
  Show dependency treegraph
 
Reported: 2012-08-10 15:38 PDT by Will Nayes [:wnayes]
Modified: 2012-08-20 08:28 PDT (History)
4 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Add a check for aPageId before closing the wizard (1019 bytes, patch)
2012-08-10 15:46 PDT, Will Nayes [:wnayes]
enndeakin: review+
Details | Diff | Splinter Review

Description Will Nayes [:wnayes] 2012-08-10 15:38:19 PDT
I was trying to use advance() with a page ID parameter on the last page to send the user to a previous page. The use of goTo() is not a desired alternative, as it does not properly handle the page stack and makes the Back/Next buttons unreliable.

Expected: The wizard would jump to the page ID specified as an argument to advance().

Result: The wizard calls the method in "wizardfinish" and closes.

I believe a fix could be done with a single change at
http://mxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/wizard.xml#270
The existence of aPageId should also be checked with onLastPage to ensure that the wizard is really ready to finish and close.

I am new to patching Mozilla, so I may or may not be successful in creating one myself.
Comment 1 Will Nayes [:wnayes] 2012-08-10 15:46:34 PDT
Created attachment 651022 [details] [diff] [review]
Add a check for aPageId before closing the wizard

This adds a check to ensure that there is no page ID before closing the wizard when advancing backwards on the last page.
Comment 2 Neil Deakin 2012-08-13 12:17:14 PDT
Comment on attachment 651022 [details] [diff] [review]
Add a check for aPageId before closing the wizard

Thanks for the patch. I assume you don't have permission to check the patch in. In this case, you can set the 'checkin-needed' keyword on the bug and someone will check it in for you.
Comment 3 Ryan VanderMeulen [:RyanVM] 2012-08-13 18:56:45 PDT
Trivial enough to land without a Try push. Thanks for the patch, Will! You can confirm that this bug is fixed once it lands on mozilla-central (probably tomorrow morning).

https://hg.mozilla.org/integration/mozilla-inbound/rev/636c283ed0ed
Comment 4 Ed Morley [:emorley] 2012-08-14 05:59:59 PDT
https://hg.mozilla.org/mozilla-central/rev/636c283ed0ed

Note You need to log in before you can comment on or make changes to this bug.