fix #1693 searchbox is broken when creating ace in pre tag
This commit is contained in:
parent
f5334ceaa2
commit
4307aba209
2 changed files with 13 additions and 8 deletions
|
|
@ -40,14 +40,18 @@ function warn() {
|
|||
}
|
||||
}
|
||||
function def(o, key, get) {
|
||||
Object.defineProperty(o, key, {
|
||||
configurable: true,
|
||||
get: get,
|
||||
set: function(val) {
|
||||
delete o[key];
|
||||
o[key] = val;
|
||||
}
|
||||
});
|
||||
try {
|
||||
Object.defineProperty(o, key, {
|
||||
configurable: true,
|
||||
get: get,
|
||||
set: function(val) {
|
||||
delete o[key];
|
||||
o[key] = val;
|
||||
}
|
||||
});
|
||||
} catch(e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
def(window, "ace", function(){ warn(); return window.env.editor });
|
||||
def(window, "editor", function(){ warn(); return window.env.editor });
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
position: absolute;
|
||||
top: 0px;
|
||||
z-index: 99;
|
||||
white-space: normal;
|
||||
}
|
||||
.ace_search.left {
|
||||
border-left: 0 none;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue