Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dialog.showMessageBoxSync defaultId not work under windows OS. #22600

Open
3 tasks done
ForJason opened this issue Mar 9, 2020 · 24 comments
Open
3 tasks done

dialog.showMessageBoxSync defaultId not work under windows OS. #22600

ForJason opened this issue Mar 9, 2020 · 24 comments

Comments

@ForJason
Copy link

ForJason commented Mar 9, 2020

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • 8.0.0
  • Operating System:
    • Windows 10 (18362)
    • Ubuntu 14.04 x64
  • Last Known Working Electron version:

Expected Behavior

dialog.showMessageBoxSync(null, { type:'warning', buttons: ['Yes', 'No'], defaultId: 1, cancelId: 1, title: 'Power Control', message: "Warning!", });
I set "defaultId:1", after executing the function,it should focus on the "No" button.

Actual Behavior

Execute the function, in windows 10, it focuses on the "Yes" button. And it focuses on the "No" button in Ubuntu 14.04.

To Reproduce

$ git clone git@github.com:ForJason/electron-smt.git
$ cd electron-smt
$ npm start

Screenshots

win10
ubuntu

Additional Information

@codebytere
Copy link
Member

@ForJason can you confirm the last working version of this? Did it work in v7? v6, or v5?

@ForJason
Copy link
Author

@ForJason can you confirm the last working version of this? Did it work in v7? v6, or v5?
I tested it based on v7.1, v6.1 and v5.0, it did't work. In addition, the v5.0 not support "showMessageBoxSync", replace it with "showMessageBox".
Hope it helps you.
2020-03-10_095630
5-0
v6-1
v7-1

@sofianguy sofianguy added this to Unsorted Issues in 8.2.x Mar 11, 2020
@jado66
Copy link

jado66 commented Jan 19, 2021

I think this is still an issue.

@electron-triage
Copy link

The Electron version reported on this issue is no longer supported. See our supported versions documentation.

If you're still experiencing this issue on a supported version, please open a new issue with an updated repro - a Fiddle is very appreciated.

Electron has a large issues backlog. To help our team prioritize, we're closing older issues and asking for new issues with updated repro steps if it affects a supported version. This helps sort what issues are still relevant and helps us fix them more quickly.

Thanks for your patience and understanding!

@pushkin-
Copy link

This repros with Electron 12.0.1. If you explicitly set noLink to false, the issues goes away. Yes and No buttons seems to be defaulting to the no link display. If you change the labels, it will also work, but will look like this (which is where the noLink property comes in):

image

@nornagon nornagon reopened this Mar 11, 2021
@pushkin-
Copy link

This might affect other common buttons

@MRayermannMSFT
Copy link
Contributor

I see defaultId working even with noLink: true.

@ArnieGA
Copy link

ArnieGA commented Jun 22, 2022

Confirming that it still doesn't work as expected

Property Value
Electron 19.0.4 and 19.0.5
OS Edition Windows 10 Pro
OS Version 21H2
OS build 19044.1766

The defaultId is simply ignored.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2022

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Oct 8, 2022
@ArnieGA
Copy link

ArnieGA commented Oct 8, 2022 via email

@github-actions github-actions bot removed the stale label Oct 9, 2022
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Jan 10, 2023
@pushkin-
Copy link

bump

@rykermcintyre
Copy link

This is still an issue. I have noLink: false, but I also have a non-link button (since it says "OK"). My defaultId is 1, so I would expect "OK" to be selected, but the link button is, instead.

image

@github-actions github-actions bot removed the stale label Jan 11, 2023
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Apr 12, 2023
@pushkin-
Copy link

repros in v24

@github-actions github-actions bot removed the stale label Apr 13, 2023
@Andrew-web-coder
Copy link

defaultId option is not working at all

@electron-issue-triage
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@MRayermannMSFT
Copy link
Contributor

bump

@electron-issue-triage
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@pushkin-
Copy link

bump

@electron-issue-triage
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@pushkin-
Copy link

bump

@electron-issue-triage
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@pushkin-
Copy link

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
8.2.x
Unsorted Issues
Development

No branches or pull requests

10 participants