mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
01392e90a2
commit
7ea2f1fb60
@ -151,6 +151,9 @@
|
||||
<field name="mContextTab">
|
||||
null
|
||||
</field>
|
||||
<field name="mModalDialogShowing">
|
||||
false
|
||||
</field>
|
||||
|
||||
<!-- A web progress listener object definition for a given tab. -->
|
||||
<method name="mTabProgressListener">
|
||||
@ -1376,6 +1379,9 @@
|
||||
onget="return this.mCurrentBrowser.userTypedValue;"
|
||||
onset="return this.mCurrentBrowser.userTypedValue = val;"/>
|
||||
|
||||
<property name="forceSyncURLBarUpdate"
|
||||
onget="return this.mModalDialogShowing;"/>
|
||||
|
||||
<constructor>
|
||||
<![CDATA[
|
||||
this.mCurrentBrowser = this.mPanelContainer.firstChild;
|
||||
@ -1423,6 +1429,32 @@
|
||||
event.preventDefault();
|
||||
]]>
|
||||
</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>
|
||||
</binding>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user