Fix Linux focus bugs entirely and also (hopefully) fix the white bar issue
This commit is contained in:
parent
c6c5f6c2f7
commit
a6b5717b8e
|
@ -97,6 +97,12 @@ var Zotero_QuickFormat = new function () {
|
||||||
panelLocatorLabel = document.getElementById("locator-label");
|
panelLocatorLabel = document.getElementById("locator-label");
|
||||||
panelLocator = document.getElementById("locator");
|
panelLocator = document.getElementById("locator");
|
||||||
panelInfo = document.getElementById("citation-properties-info");
|
panelInfo = document.getElementById("citation-properties-info");
|
||||||
|
|
||||||
|
|
||||||
|
// Don't need to set noautohide dynamically on these platforms, so do it now
|
||||||
|
if(Zotero.isMac || Zotero.isWin) {
|
||||||
|
tabPanel.setAttribute("noautohide", true);
|
||||||
|
}
|
||||||
} else if(event.target === qfi.contentDocument) {
|
} else if(event.target === qfi.contentDocument) {
|
||||||
qfiWindow = qfi.contentWindow;
|
qfiWindow = qfi.contentWindow;
|
||||||
qfiDocument = qfi.contentDocument;
|
qfiDocument = qfi.contentDocument;
|
||||||
|
@ -769,21 +775,21 @@ var Zotero_QuickFormat = new function () {
|
||||||
* Opens the reference panel and potentially refocuses the main text box
|
* Opens the reference panel and potentially refocuses the main text box
|
||||||
*/
|
*/
|
||||||
function _openReferencePanel() {
|
function _openReferencePanel() {
|
||||||
|
if(!Zotero.isMac && !Zotero.isWin) {
|
||||||
|
// noautohide and noautofocus are incompatible on Linux
|
||||||
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=545265
|
||||||
|
referencePanel.setAttribute("noautohide", "false");
|
||||||
|
}
|
||||||
|
|
||||||
referencePanel.openPopup(document.documentElement, "after_start", 15,
|
referencePanel.openPopup(document.documentElement, "after_start", 15,
|
||||||
null, false, false, null);
|
null, false, false, null);
|
||||||
|
|
||||||
if(!Zotero.isMac && !Zotero.isWin) {
|
if(!Zotero.isMac && !Zotero.isWin) {
|
||||||
// When the reference panel opens, we may lose focus on Linux. We thus look for a
|
// reinstate noautohide after the window is shown
|
||||||
// deactivate event within 1 second of the panel open request.
|
referencePanel.addEventListener("popupshowing", function() {
|
||||||
var eventHandler = function(e) {
|
referencePanel.removeEventListener("popupshowing", arguments.callee, false);
|
||||||
if(e.target !== window) return;
|
referencePanel.setAttribute("noautohide", "true");
|
||||||
window.removeEventListener("deactivate", eventHandler, false);
|
}, false);
|
||||||
window.clearTimeout(timeoutID);
|
|
||||||
window.setTimeout(function() { _refocusQfe(); }, 0);
|
|
||||||
};
|
|
||||||
window.addEventListener("deactivate", eventHandler, false);
|
|
||||||
var timeoutID = window.setTimeout(function() {
|
|
||||||
window.removeEventListener("deactivate", eventHandler, false);
|
|
||||||
}, 1000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,8 @@
|
||||||
<progressmeter id="quick-format-progress-meter" mode="undetermined" value="0" flex="1"/>
|
<progressmeter id="quick-format-progress-meter" mode="undetermined" value="0" flex="1"/>
|
||||||
</deck>
|
</deck>
|
||||||
</box>
|
</box>
|
||||||
<panel id="quick-format-reference-panel" noautofocus="true" norestorefocus="true" noautohide="true" height="0">
|
<panel id="quick-format-reference-panel" noautofocus="true" norestorefocus="true"
|
||||||
|
height="0" width="0">
|
||||||
<richlistbox id="quick-format-reference-list" flex="1"/>
|
<richlistbox id="quick-format-reference-list" flex="1"/>
|
||||||
</panel>
|
</panel>
|
||||||
<panel id="citation-properties" type="arrow" orient="vertical"
|
<panel id="citation-properties" type="arrow" orient="vertical"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user