Use windowdragbox instead of moving the window ourselves

This commit is contained in:
Simon Kornblith 2011-09-07 23:57:04 +00:00
parent 181611eddf
commit 89434a7a57
2 changed files with 2 additions and 19 deletions

View file

@ -784,23 +784,6 @@ var Zotero_QuickFormat = new function () {
_showCitationProperties(event.target);
}
/**
* Called when the user begins to drag the window
*/
this.onDragStart = function(el, event) {
dragX = event.clientX;
dragY = event.clientY;
window.addEventListener("mousemove", _onDrag, false);
window.addEventListener("mouseup", function() { window.removeEventListener("mousemove", _onDrag, false) }, false);
}
/**
* Called during the window drag
*/
function _onDrag(event) {
window.moveTo(event.screenX-dragX, event.screenY-dragY);
}
/**
* Makes "Enter" work in the panel
*/

View file

@ -42,7 +42,7 @@
<script src="../include.js"/>
<script src="quickFormat.js"/>
<hbox id="quick-format-entry" ondragstart="Zotero_QuickFormat.onDragStart(this, event)">
<windowdragbox orient="horizontal" id="quick-format-entry">
<hbox id="quick-format-search" flex="1" align="start">
<toolbarbutton id="zotero-icon" type="menu">
<menupopup>
@ -59,7 +59,7 @@
<iframe id="quick-format-iframe" ondragstart="event.stopPropagation()" src="data:application/xhtml+xml,%3C!DOCTYPE%20html%20PUBLIC%20%22-//W3C//DTD%20XHTML%201.0%20Strict//EN%22%20%22http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd%22%3E%3Chtml%20xmlns=%22http://www.w3.org/1999/xhtml%22%3E%3Chead%3E%3Clink%20rel=%22stylesheet%22%20type=%22text/css%22%20href=%22chrome://zotero/skin/integration.css%22/%3E%3Clink%20rel=%22stylesheet%22%20type=%22text/css%22%20href=%22chrome://zotero-platform/content/integration.css%22/%3E%3C/head%3E%3Cbody%20contenteditable=%22true%22%20id=%22quick-format-editor%22/%3E%3C/html%3E"
tabindex="1" flex="1"/>
</hbox>
</hbox>
</windowdragbox>
<panel id="quick-format-reference-panel" noautofocus="true" norestorefocus="true">
<richlistbox id="quick-format-reference-list" flex="1"/>
</panel>