My .xhtml codes are shown below, and I did not include width/height parameters in window.openDialog()
As marked below, only when the .xhtml window id is set to id="zotero-select-item-dialog", the persist feature can work.
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">
<window xmlns:html="
http://www.w3.org/1999/xhtml"
xmlns="
http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="zotero-select-item-dialog" title="&zotero.selectitems.title;" width="400" height="600"
persist="width height screenX screenY"
onload="myPlugin_Ingester_Interface_SelectEmoji.init()">
<dialog
buttons="cancel,accept"
id="zotero-selectEmoji">
<script>
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
Services.scriptloader.loadSubScript("chrome://zotero/content/include.js", this);
Services.scriptloader.loadSubScript("chrome:/myPlugin/content/selectionDialog/selectEmoji.js", this);
Services.scriptloader.loadSubScript("chrome://zotero/content/customElements.js", this);
</script>
<vbox id="zotero-select-Emoji-container" flex="1">
<hbox align="center">
<label><html:h3 id="zotero-selectEmoji-intro">选择表情</html:h3></label>
</hbox>
<box flex="1">
<richlistbox id="zotero-selectEmoji-links" flex="1"></richlistbox>
</box>
</vbox>
</dialog>
</window>