Skip to content

Commit cef48f6

Browse files
committedOct 20, 2014
Responded to suggestions by nightwing
Removed style changes (no style changes are part of the PR). Only change now should be that we create a <div/> element instead of a <pre/> element.
1 parent 2636e5d commit cef48f6

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed
 

‎lib/ace/autocomplete.js

+3-9
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,12 @@ var Autocomplete = function() {
352352

353353
this.showDocTooltip = function(item) {
354354
if (!this.tooltipNode) {
355-
this.tooltipNode = item.docHTML ? dom.createElement("div") : dom.createElement("pre");
355+
this.tooltipNode = dom.createElement("div");
356356
this.tooltipNode.className = "ace_tooltip ace_doc-tooltip";
357357
this.tooltipNode.style.margin = 0;
358358
this.tooltipNode.style.pointerEvents = "auto";
359359
this.tooltipNode.tabIndex = -1;
360360
this.tooltipNode.onblur = this.blurListener.bind(this);
361-
362361
}
363362

364363
var tooltipNode = this.tooltipNode;
@@ -367,15 +366,14 @@ var Autocomplete = function() {
367366
} else if (item.docText) {
368367
tooltipNode.textContent = item.docText;
369368
}
370-
369+
371370
if (!tooltipNode.parentNode)
372371
document.body.appendChild(tooltipNode);
373372
var popup = this.popup;
374373
var rect = popup.container.getBoundingClientRect();
375374
tooltipNode.style.top = popup.container.style.top;
376375
tooltipNode.style.bottom = popup.container.style.bottom;
377-
tooltipNode.style.backgroundImage = "none";
378-
tooltipNode.style.backgroundColor = "#FFFFEE";
376+
379377
if (window.innerWidth - rect.right < 320) {
380378
tooltipNode.style.right = window.innerWidth - rect.left + "px";
381379
tooltipNode.style.left = "";
@@ -384,10 +382,6 @@ var Autocomplete = function() {
384382
tooltipNode.style.right = "";
385383
}
386384
tooltipNode.style.display = "block";
387-
tooltipNode.style.maxWidth = "500px";
388-
tooltipNode.style.whiteSpace = "normal";
389-
tooltipNode.style.wordWrap = "normal";
390-
tooltipNode.style.textAlign = "left";
391385
};
392386

393387
this.hideDocTooltip = function() {

0 commit comments

Comments
 (0)
Please sign in to comment.