kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Fix test for needing to update text editor DOM
Checking the active element is clumsy, and interferes with debugging. Checking the content is clearer, and avoids the Firefox bug. Fixes #4472fix-syncer
rodzic
6091b01386
commit
a65ec87c53
|
@ -106,7 +106,7 @@ Set the text of the engine if it doesn't currently have focus
|
|||
*/
|
||||
FramedEngine.prototype.setText = function(text,type) {
|
||||
if(!this.domNode.isTiddlyWikiFakeDom) {
|
||||
if(this.domNode.ownerDocument.activeElement !== this.domNode) {
|
||||
if(this.domNode.value !== text) {
|
||||
this.domNode.value = text;
|
||||
}
|
||||
// Fix the height if needed
|
||||
|
|
|
@ -67,7 +67,7 @@ Set the text of the engine if it doesn't currently have focus
|
|||
*/
|
||||
SimpleEngine.prototype.setText = function(text,type) {
|
||||
if(!this.domNode.isTiddlyWikiFakeDom) {
|
||||
if(this.domNode.ownerDocument.activeElement !== this.domNode || text === "") {
|
||||
if(this.domNode.value !== text) {
|
||||
this.domNode.value = text;
|
||||
}
|
||||
// Fix the height if needed
|
||||
|
|
Ładowanie…
Reference in New Issue