Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Remove modal-wrapper whenever modal dialog is closed #5579

Merged
merged 6 commits into from
Oct 23, 2013

Conversation

WebsiteDeveloper
Copy link
Contributor

Old Subject: Issue #5558 and #5548 Dialog fixes

More general fix for issue #5558 (see pull #5559 )
@redmunds
cc @peterflynn

Edit: Incorporated fix for #5548

@WebsiteDeveloper
Copy link
Contributor Author

@SAplayer i added the fix for #5548 could you please test this.

@marcelgerber
Copy link
Contributor

Focusing with tab is working, but the arrow keys still don't work.
Also, there are two JSLint errors left (space after if).

@WebsiteDeveloper
Copy link
Contributor Author

@SAplayer well i plan to add the support for the arrow keys in a subsequent pull request.

// Click primary button
$primaryBtn.click();
// Click focused button or primary if no focus
if($focusedElement.length !== 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSLint: Expected exactly one space between 'if' and '('.

@redmunds
Copy link
Contributor

Done with review. Nice refactoring! Just a couple JSLint errors to fix.

@WebsiteDeveloper
Copy link
Contributor Author

@redmunds fixed.

@redmunds
Copy link
Contributor

Note: I gave this a more descriptive subject. It's best to put bug numbers in description.

@WebsiteDeveloper
Copy link
Contributor Author

Will do so in the future.

$primaryBtn.click();
// Click focused button or primary if no focus
if ($focusedElement.length !== 0) {
$focusedElement.click();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RaymondLim brought up a good point (offline), so I'll comment here for him. Focused element should only receive click with space-bar, not Enter key.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about that too, but it is the default behavior in chrome and firefox so i decided to add it.
I also find it more convenient.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that seems to be the case. I'll wait until @RaymondLim responds.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WebsiteDeveloper
I agree with you that it is more convenient, but it is not standard both on Windows and Mac. You can try it in the Open File dialog on both platforms. On Windows, default button switches as you tab between OK and Cancel button. So it is not ambiguous when you hit Enter key when focus is on Cancel button. However, if you tab to other buttons (Organize, New Folder, More Options) and hit Enter key, you will see that default button takes action. On Mac, it is pretty clear that hitting Enter key on any button other than OK (default button) always takes the action of the default button.

Regarding your claim of default behavior in chrome and firefox, I'm not sure you're referring to any modal dialog that has that behavior. Let me know if you see that behavior in any modal dialog and not in a web page.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will check tomorrow as it's already late here in germany

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will rechange it.

@redmunds
Copy link
Contributor

@WebsiteDeveloper Any progress on this PR? We really want to get this fixed in Sprint 33 which ends Friday. Thanks.

@WebsiteDeveloper
Copy link
Contributor Author

@redmunds pushed changes.

@redmunds
Copy link
Contributor

Looks good. Merging.

redmunds added a commit that referenced this pull request Oct 23, 2013
Remove modal-wrapper whenever modal dialog is closed
@redmunds redmunds merged commit c131fbc into adobe:master Oct 23, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants