Surely this cannot be the intended behabour...
If your app is running in a tab, it changes the tab title and the main browser title when all you want is the title of the window to change. Closing the window leaves the the tab and browser set to the undesired titile!
It seems to come from line 267 of CPPlatformWindow on this commit...
Here is a example test along with a suggested fix for review.
@implementation AppController : CPObject
window = [[CPWindow alloc] initWithContentRect:CPRectMake(30, 30, 200, 200) styleMask:CPTitledWindowMask | CPClosableWindowMask];
var button = [CPButton buttonWithTitle:@"ChangeTitle"];
[[window contentView] addSubview:button];
[window setTitle:@"two all beef patties"];
[window setTitle:@"special sauce, lettuce cheese..."];
// uncomment this to use fix
@implementation CPPlatformWindow (debug)
- (void)_setTitle:(CPString)aTitle window:(CPWindow)aWindow
_title = aTitle;
if (_DOMWindow && _DOMWindow.document && ([aWindow platformWindow] !== [CPPlatformWindow primaryPlatformWindow]))
_DOMWindow.document.title = _title;
Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.
Do you know and point to the page about how this works in Cocoa?
As far as I know, the current behavior works as described in the document-based app guide. So I think we need to nail various possible cases to fix.
Milestone: Someday. Labels: #needs-info, #new, AppKit. What's next? Additional information should be added as a comment to this isuse.
Milestone: Someday. Labels: #needs-info, AppKit, bug. What's next? Additional information should be added as a comment to this isuse.
Milestone: Someday. Labels: #accepted, AppKit, bug. What's next? A reviewer should examine this issue.
Milestone: Someday. Labels: #fixed, AppKit, bug. What's next? This issue is considered successfully resolved.