зеркало из https://github.com/mozilla/pjs.git
Fixing bug 262887. Make dialogs opened through the DOM make the opening tab the current tab. r=ben@mozilla.org, dveditz@cruzio.com, sr=bryner@brianryner.com
This commit is contained in:
Родитель
c9f827edd5
Коммит
ccb21d6e8b
|
@ -151,6 +151,9 @@
|
||||||
<field name="mContextTab">
|
<field name="mContextTab">
|
||||||
null
|
null
|
||||||
</field>
|
</field>
|
||||||
|
<field name="mModalDialogShowing">
|
||||||
|
false
|
||||||
|
</field>
|
||||||
|
|
||||||
<!-- A web progress listener object definition for a given tab. -->
|
<!-- A web progress listener object definition for a given tab. -->
|
||||||
<method name="mTabProgressListener">
|
<method name="mTabProgressListener">
|
||||||
|
@ -1376,6 +1379,9 @@
|
||||||
onget="return this.mCurrentBrowser.userTypedValue;"
|
onget="return this.mCurrentBrowser.userTypedValue;"
|
||||||
onset="return this.mCurrentBrowser.userTypedValue = val;"/>
|
onset="return this.mCurrentBrowser.userTypedValue = val;"/>
|
||||||
|
|
||||||
|
<property name="forceSyncURLBarUpdate"
|
||||||
|
onget="return this.mModalDialogShowing;"/>
|
||||||
|
|
||||||
<constructor>
|
<constructor>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
this.mCurrentBrowser = this.mPanelContainer.firstChild;
|
this.mCurrentBrowser = this.mPanelContainer.firstChild;
|
||||||
|
@ -1423,6 +1429,32 @@
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
]]>
|
]]>
|
||||||
</handler>
|
</handler>
|
||||||
|
<handler event="DOMWillOpenModalDialog">
|
||||||
|
<![CDATA[
|
||||||
|
if (!event.isTrusted)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// We're about to open a modal dialog, make sure the opening
|
||||||
|
// tab is brought to the front.
|
||||||
|
|
||||||
|
for (var i = 0; i < browsers.length; ++i) {
|
||||||
|
if (this.getBrowserAtIndex(i).contentWindow == event.target) {
|
||||||
|
this.mModalDialogShowing = true;
|
||||||
|
this.selectedTab = this.mTabContainer.childNodes[i];
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]]>
|
||||||
|
</handler>
|
||||||
|
<handler event="DOMModalDialogClosed">
|
||||||
|
<![CDATA[
|
||||||
|
if (!event.isTrusted)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.mModalDialogShowing = false;
|
||||||
|
]]>
|
||||||
|
</handler>
|
||||||
</handlers>
|
</handlers>
|
||||||
</binding>
|
</binding>
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче