summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorAndrew Eisenberg2012-01-14 16:59:46 (EST)
committer Mark Macdonald2012-01-16 17:47:32 (EST)
commit02781e080a6fefe5ec1ce1719a1b82327dcb91b5 (patch)
treeaea0c599c6a7bbeac527aa868d5a15917a069039
parent05d0f990307cc792fe61240deb48d06a453012d5 (diff)
downloadorg.eclipse.orion.client-02781e080a6fefe5ec1ce1719a1b82327dcb91b5.zip
org.eclipse.orion.client-02781e080a6fefe5ec1ce1719a1b82327dcb91b5.tar.gz
org.eclipse.orion.client-02781e080a6fefe5ec1ce1719a1b82327dcb91b5.tar.bz2
Fix for Big 368574v20120116-2247
-rw-r--r--bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js
index a771c74..698cba0 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js
@@ -58,6 +58,13 @@ define("orion/editor/contentAssist", ['orion/textview/keyBinding', 'orion/textvi
},
onScroll: function(event) {
self.cancel();
+ },
+ onMouseUp: function(event) {
+ // ignore the event if this is a click inside of the contentAssistPanel
+ // the click is handled by the accept function
+ if (event.event.target.parentElement !== self.contentAssistPanel) {
+ self.cancel();
+ }
}
};
this.init();
@@ -202,6 +209,7 @@ define("orion/editor/contentAssist", ['orion/textview/keyBinding', 'orion/textvi
this.textView.removeEventListener("ModelChanging", this.contentAssistListener.onModelChanging);
this.textView.removeEventListener("ModelChanged", this.contentAssistListener.onModelChanged);
this.textView.removeEventListener("Scroll", this.contentAssistListener.onScroll);
+ this.textView.removeEventListener("MouseUp", this.contentAssistListener.onMouseUp);
this.listenerAdded = false;
}
this.active = false;
@@ -285,6 +293,7 @@ define("orion/editor/contentAssist", ['orion/textview/keyBinding', 'orion/textvi
this.textView.addEventListener("ModelChanging", this.contentAssistListener.onModelChanging);
this.textView.addEventListener("ModelChanged", this.contentAssistListener.onModelChanged);
this.textView.addEventListener("Scroll", this.contentAssistListener.onScroll);
+ this.textView.addEventListener("MouseUp", this.contentAssistListener.onMouseUp);
}
this.listenerAdded = true;
this.contentAssistPanel.onclick = this.click.bind(this);