mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-28 17:32:03 +00:00
Fix CPPlatformWindow's title bug
if setTitle: is called on a CPWindow with the primaryPlatformWindow as platformWindow, the main page's title is changed. This patch prevent changing the primaryPlatformWindow's title. This is not optimal, but this is better than changing the title at each window setTitle: call
This commit is contained in:
1 parent
608cb86a4a
commit
be10bcf27a
2 files changed
+4
-2
No files matched your search
@@ -264,7 +264,8 @@ var PrimaryPlatformWindow = NULL;
|
||||
_title = aTitle;
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
if (_DOMWindow && _DOMWindow.document)
|
||||
if (_DOMWindow && _DOMWindow.document
|
||||
&& (self != [CPPlatformWindow primaryPlatformWindow]))
|
||||
_DOMWindow.document.title = _title;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -541,7 +541,8 @@ var ModifierKeyCodes = [
|
||||
// FIXME: cpSetFrame?
|
||||
_DOMWindow.document.write("<!DOCTYPE html><html lang='en'><head></head><body style='background-color:transparent;'></body></html>");
|
||||
_DOMWindow.document.close();
|
||||
_DOMWindow.document.title = _title;
|
||||
if (self != [CPPlatformWindow primaryPlatformWindow])
|
||||
_DOMWindow.document.title = _title;
|
||||
|
||||
if (![CPPlatform isBrowser])
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user