зеркало из https://github.com/mozilla/pluotsorbet.git
Fix nits and remove the hacking of changing html editor element visibility by setting opacity and z-index
This commit is contained in:
Родитель
d7c5d21049
Коммит
624bf9663a
|
@ -1591,7 +1591,7 @@ var currentlyFocusedTextEditor;
|
|||
promise = this.textEditor.blur();
|
||||
currentlyFocusedTextEditor = null;
|
||||
} else {
|
||||
promise = Promise.resolve();
|
||||
return;
|
||||
}
|
||||
asyncImpl("V", promise);
|
||||
};
|
||||
|
|
|
@ -73,7 +73,7 @@ var TextEditorProvider = (function() {
|
|||
return new Promise(function(resolve, reject) {
|
||||
if (currentVisibleEditor !== this ||
|
||||
document.activeElement === this.textEditorElem) {
|
||||
resolve()
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
setTimeout(this.textEditorElem.focus.bind(this.textEditorElem));
|
||||
|
@ -118,15 +118,8 @@ var TextEditorProvider = (function() {
|
|||
}
|
||||
|
||||
if (aVisible) {
|
||||
// Add the "show" class to set opacity to 0.
|
||||
// Sometimes in Java, setVisible() is called after focus(), to make
|
||||
// sure the native input won't lose focus, we change opacity instead
|
||||
// of visibility.
|
||||
this.textEditorElem.classList.add("show");
|
||||
} else {
|
||||
// Remove the "show" class to set z-index to -999.
|
||||
// To make sure the j2me control could be clicked again to show the
|
||||
// textEditor, we need to put the textEditor at the bottom.
|
||||
this.textEditorElem.classList.remove("show");
|
||||
}
|
||||
|
||||
|
@ -213,7 +206,7 @@ var TextEditorProvider = (function() {
|
|||
},
|
||||
|
||||
setForegroundColor: function(color) {
|
||||
this.foregroundColor = color;
|
||||
this.foregroundColor = color;
|
||||
this._setStyle("color", util.abgrIntToCSS(color));
|
||||
},
|
||||
|
||||
|
|
|
@ -326,13 +326,11 @@ form[role="dialog"][data-type="confirm"].lcdui-alert section {
|
|||
position: absolute;
|
||||
border: none;
|
||||
resize: none;
|
||||
opacity: 0;
|
||||
z-index: -999;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.text-editor.show{
|
||||
opacity: 1;
|
||||
z-index: 10;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
#textarea-editor {
|
||||
|
|
Загрузка…
Ссылка в новой задаче