mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 00:46:16 -04:00
Merge pull request #1059 from lepidum/develop
Fix for #1032 caused by pull-request 999
This commit is contained in:
commit
da9439d36e
4 changed files with 25 additions and 21 deletions
|
@ -122,6 +122,11 @@ function Ace2Editor()
|
||||||
return info.ace_getDebugProperty(prop);
|
return info.ace_getDebugProperty(prop);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
editor.getInInternationalComposition = function()
|
||||||
|
{
|
||||||
|
return info.ace_getInInternationalComposition();
|
||||||
|
};
|
||||||
|
|
||||||
// prepareUserChangeset:
|
// prepareUserChangeset:
|
||||||
// Returns null if no new changes or ACE not ready. Otherwise, bundles up all user changes
|
// Returns null if no new changes or ACE not ready. Otherwise, bundles up all user changes
|
||||||
// to the latest base text into a Changeset, which is returned (as a string if encodeAsString).
|
// to the latest base text into a Changeset, which is returned (as a string if encodeAsString).
|
||||||
|
|
|
@ -1173,7 +1173,7 @@ function Ace2Inner(){
|
||||||
//if (! top.BEFORE) top.BEFORE = [];
|
//if (! top.BEFORE) top.BEFORE = [];
|
||||||
//top.BEFORE.push(magicdom.root.dom.innerHTML);
|
//top.BEFORE.push(magicdom.root.dom.innerHTML);
|
||||||
//if (! isEditable) return; // and don't reschedule
|
//if (! isEditable) return; // and don't reschedule
|
||||||
if (window.parent.parent.inInternationalComposition)
|
if (inInternationalComposition)
|
||||||
{
|
{
|
||||||
// don't do idle input incorporation during international input composition
|
// don't do idle input incorporation during international input composition
|
||||||
idleWorkTimer.atLeast(500);
|
idleWorkTimer.atLeast(500);
|
||||||
|
@ -3729,7 +3729,7 @@ function Ace2Inner(){
|
||||||
thisKeyDoesntTriggerNormalize = true;
|
thisKeyDoesntTriggerNormalize = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!specialHandled) && (!thisKeyDoesntTriggerNormalize) && (!window.parent.parent.inInternationalComposition))
|
if ((!specialHandled) && (!thisKeyDoesntTriggerNormalize) && (!inInternationalComposition))
|
||||||
{
|
{
|
||||||
if (type != "keyup" || !incorpIfQuick())
|
if (type != "keyup" || !incorpIfQuick())
|
||||||
{
|
{
|
||||||
|
@ -4589,9 +4589,24 @@ function Ace2Inner(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var inInternationalComposition = false;
|
||||||
function handleCompositionEvent(evt)
|
function handleCompositionEvent(evt)
|
||||||
{
|
{
|
||||||
window.parent.parent.handleCompositionEvent(evt);
|
// international input events, fired in FF3, at least; allow e.g. Japanese input
|
||||||
|
if (evt.type == "compositionstart")
|
||||||
|
{
|
||||||
|
inInternationalComposition = true;
|
||||||
|
}
|
||||||
|
else if (evt.type == "compositionend")
|
||||||
|
{
|
||||||
|
inInternationalComposition = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
editorInfo.ace_getInInternationalComposition = function ()
|
||||||
|
{
|
||||||
|
return inInternationalComposition;
|
||||||
}
|
}
|
||||||
|
|
||||||
function bindTheEventHandlers()
|
function bindTheEventHandlers()
|
||||||
|
|
|
@ -111,7 +111,7 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
|
||||||
|
|
||||||
function handleUserChanges()
|
function handleUserChanges()
|
||||||
{
|
{
|
||||||
if (window.parent.parent.inInternationalComposition) return;
|
if (editor.getInInternationalComposition()) return;
|
||||||
if ((!getSocket()) || channelState == "CONNECTING")
|
if ((!getSocket()) || channelState == "CONNECTING")
|
||||||
{
|
{
|
||||||
if (channelState == "CONNECTING" && (((+new Date()) - initialStartConnectTime) > 20000))
|
if (channelState == "CONNECTING" && (((+new Date()) - initialStartConnectTime) > 20000))
|
||||||
|
@ -288,7 +288,7 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
|
||||||
var apool = msg.apool;
|
var apool = msg.apool;
|
||||||
|
|
||||||
// When inInternationalComposition, msg pushed msgQueue.
|
// When inInternationalComposition, msg pushed msgQueue.
|
||||||
if (msgQueue.length > 0 || window.parent.parent.inInternationalComposition) {
|
if (msgQueue.length > 0 || editor.getInInternationalComposition()) {
|
||||||
if (msgQueue.length > 0) oldRev = msgQueue[msgQueue.length - 1].newRev;
|
if (msgQueue.length > 0) oldRev = msgQueue[msgQueue.length - 1].newRev;
|
||||||
else oldRev = rev;
|
else oldRev = rev;
|
||||||
|
|
||||||
|
|
|
@ -51,22 +51,6 @@ var randomString = require('./pad_utils').randomString;
|
||||||
|
|
||||||
var hooks = require('./pluginfw/hooks');
|
var hooks = require('./pluginfw/hooks');
|
||||||
|
|
||||||
window.inInternationalComposition = false;
|
|
||||||
var inInternationalComposition = window.inInternationalComposition;
|
|
||||||
|
|
||||||
window.handleCompositionEvent = function handleCompositionEvent(evt)
|
|
||||||
{
|
|
||||||
// international input events, fired in FF3, at least; allow e.g. Japanese input
|
|
||||||
if (evt.type == "compositionstart")
|
|
||||||
{
|
|
||||||
this.inInternationalComposition = true;
|
|
||||||
}
|
|
||||||
else if (evt.type == "compositionend")
|
|
||||||
{
|
|
||||||
this.inInternationalComposition = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function createCookie(name, value, days, path)
|
function createCookie(name, value, days, path)
|
||||||
{
|
{
|
||||||
if (days)
|
if (days)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue