Index: jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java =================================================================== --- jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java (revision 11308) +++ jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java (working copy) @@ -90,7 +90,6 @@ static String SELECT_BAR = "SELECT_LBAR"; //$NON-NLS-1$ private XulRunnerEditor xulRunnerEditor; - private nsIDOMDocument domDocument; private nsIDOMEventTarget documentEventTarget; private nsIDOMElement contentArea; private nsIDOMNode headNode; @@ -454,19 +453,13 @@ } public nsIDOMDocument getDomDocument() { - if (domDocument == null) { - domDocument = xulRunnerEditor.getDOMDocument(); - } - return domDocument; + + return xulRunnerEditor.getDOMDocument(); } /** * @param domDocument the domDocument to set */ - protected void setDomDocument(nsIDOMDocument domDocument) { - - this.domDocument = domDocument; - } public nsIDOMElement getContentArea() { return contentArea; @@ -604,7 +597,7 @@ getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.DRAGOVEREVENT, getContentAreaEventListener(), false); getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.DBLCLICK, getContentAreaEventListener(), false); - if (domDocument != null && documentEventTarget != null) { + if (xulRunnerEditor.getDOMDocument() != null && documentEventTarget != null) { documentEventTarget.removeEventListener(MozillaDomEventListener.KEYPRESS, getContentAreaEventListener(), false); } getContentAreaEventListener().setVisualEditor(null);