Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 350351
Collapse All | Expand All

(-)a/bundles/org.eclipse.orion.client.core/web/css/ide.css (+2 lines)
Lines 477-482 a:hover { Link Here
477
	border: 2px inset #DDD;
477
	border: 2px inset #DDD;
478
	z-index:10;
478
	z-index:10;
479
	cursor: default;
479
	cursor: default;
480
	overflow: scroll;
481
	height: 150px;
480
}
482
}
481
483
482
.contentassist .selected {
484
.contentassist .selected {
(-)a/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js (+19 lines)
Lines 172-177 orion.editor.ContentAssist = (function() { Link Here
172
				}
172
				}
173
				if (child === node) {
173
				if (child === node) {
174
					child.className = "selected";
174
					child.className = "selected";
175
					child.focus();
176
					if (child.offsetTop < this.contentAssistPanel.scrollTop) {
177
						// The child element is "above" the view
178
						child.scrollIntoView(true);
179
					} else if ((child.offsetTop + child.offsetHeight + 20) > (this.contentAssistPanel.scrollTop + this.contentAssistPanel.offsetHeight)) {
180
						// The child element is "below" the bottom of the view
181
						// Note: 20 in the condition is for the horizontal scrollbar height
182
						child.scrollIntoView(false);
183
					}
175
				}
184
				}
176
			}
185
			}
177
		},
186
		},
Lines 286-291 orion.editor.ContentAssist = (function() { Link Here
286
						this.contentAssistPanel.style.left = caretLocation.x + "px";
295
						this.contentAssistPanel.style.left = caretLocation.x + "px";
287
						this.contentAssistPanel.style.top = caretLocation.y + "px";
296
						this.contentAssistPanel.style.top = caretLocation.y + "px";
288
						this.contentAssistPanel.style.display = "block";
297
						this.contentAssistPanel.style.display = "block";
298
						this.contentAssistPanel.scrollTop = 0;
299
300
						// Make sure that the panel is never outside the viewport
301
						if (caretLocation.y + this.contentAssistPanel.offsetHeight > dojo.window.getBox().h) {
302
							this.contentAssistPanel.style.top = (caretLocation.y - this.contentAssistPanel.offsetHeight - this.textView.getLineHeight()) + "px";
303
						}
304
						if (caretLocation.x + this.contentAssistPanel.offsetWidth > dojo.window.getBox().w) {
305
							this.contentAssistPanel.style.left = (dojo.window.getBox().w - this.contentAssistPanel.offsetWidth) + "px";
306
						}
307
289
						if (!this.listenerAdded) {
308
						if (!this.listenerAdded) {
290
							this.textView.addEventListener("ModelChanged", this, this.contentAssistListener.onModelChanged);
309
							this.textView.addEventListener("ModelChanged", this, this.contentAssistListener.onModelChanged);
291
							this.textView.addEventListener("Scroll", this, this.contentAssistListener.onScroll);
310
							this.textView.addEventListener("Scroll", this, this.contentAssistListener.onScroll);

Return to bug 350351