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

Windows: When using chrome runtime style, open _blank links in new tabs instead of new windows #348

Open
belbernard opened this issue Dec 2, 2024 · 2 comments

Comments

@belbernard
Copy link

PHP Desktop now works with Windows 10 and my application (Bol Processor), but it does not behave correctly with "_blank" links. By default, it opens new windows instead of new tabs, and these windows have a unique size, even if a different size is requested in window.open().

However, sometimes it works correctly! The attached image should illustrate my point: when I start PHP Desktop, I get the window shown above, simply titled "Bol Processor" and showing no tabs. Each click on this page (e.g. "-gr.Mozart") opens a new window like the one shown at the back, with a place for tabs and a visible URL "127.0.0.1:51899/php/data.php... etc". When I click on a link in this new window that asks for a new tab, it correctly opens a new tab, which the first window did not. And links that contain a window.open() instruction correctly open windows of the required size.

So it's not far from perfect, but I still need to solve the problem of the first window.

Below is the content of settings.json, which I am using for this project. Maybe the solution is there?

===

{
"application": {
"single_instance_guid": "",
"dpi_aware": true
},
"debugging": {
"show_console": false,
"subprocess_show_console": false,
"log_level": "DEBUG4",
"log_file": "debug.log"
},
"main_window": {
"title": "Bol Processor",
"icon": "",
"default_size": [800, 600],
"minimum_size": [640, 480],
"maximum_size": [0, 0],
"disable_maximize_button": false,
"center_on_screen": true,
"start_maximized": false,
"start_fullscreen": false,
"always_on_top": false,
"minimize_to_tray": false,
"minimize_to_tray_message": "Minimized to tray"
},
"popup_window": {
"icon": "",
"fixed_title": "",
"center_relative_to_parent": false,
"default_size": [600, 480]
},
"web_server": {
"listen_on": ["127.0.0.1", 51899],
"www_directory": "bolprocessor/",
"index_files": ["index.html", "index.php"],
"cgi_interpreter": "php/php-cgi.exe",
"cgi_extensions": ["php"],
"cgi_temp_dir": "",
"404_handler": "/pretty-urls.php",
"hide_files": []
},
"chrome": {
"log_file": "debug.log",
"log_severity": "default",
"cache_path": "webcache",
"external_drag": true,
"external_navigation": true,
"reload_page_F5": true,
"devtools_F12": true,
"remote_debugging_port": 0,
"runtime_style": "chrome",
"command_line_switches": {"disable-gpu": ""},
"enable_downloads": true,
"context_menu": {
"enable_menu": true,
"navigation": true,
"print": true,
"view_source": true,
"open_in_external_browser": true,
"devtools": true
}
}
}
Capture

@cztomczak
Copy link
Owner

You mean that you would like for the main php desktop window to have the Chromium window style?

@belbernard
Copy link
Author

Yes. The www_directory is "bolprocessor/". So when you start it, it displays the "index.php" file in the "bolprocessor" folder. I was expecting it to display in the standard Chromium style...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants