Jump to content
Vilĉjo Walker

Message editor - some editing keys have odd behaviour

Recommended Posts

In the editor (e.g. used to compose the message) some of the editing keys don't have their usual (for MS-Windows) behaviour

If text has been selected (e.g. by SHIFT+CURSOR_KEYS, or dragging the mouse pointer) then DELETE doesn't delete the selection - instead it deletes the character to the right of the selection. Likewise if a pasted graphic/picture has been selected, DELETE doesn't delete the selection.

CTRL+C fails to copy the selected text to the clipboard. CTRL+X fails to cut the selected text to the clipboard. (But CTRL-V does paste the content from the clipboard).

  • Thanks 1

Share this post


Link to post
Share on other sites

Yes, this is a really frustrating one and I think it's a complication (Javascript conflict) of a script used to insert Esperanto's accented characters. I noticed it in testing but only in isolated parts of the site; the bits which I was using the most were behaving themselves.

I think the solution might be to drop this particular script and try something else. I'm going to disable it in a bit to see whether that improves things.

Share this post


Link to post
Share on other sites

Typing without the script. Everything seems much better.

I think I'm going to have to look at working out an alternative. Better to have no accented characters than an editor which doesn't behave itself.

Share this post


Link to post
Share on other sites

This is the script we used on the old site, to change unaccented_char+x (or X) to accented_char, in HTML forms. Dunno if it could be adapted, or a similar approach used?

At the top of the page, we declared a JavaScript function, then within the form we triggered that function with the "onKeyUp" event.
Within the document, variable "x" when tells the function to perform the substitution.

<SCRIPT language=JavaScript>
function xAlUtf8(t) {
  if (document.getElementById("x").checked) {
    t = t.replace(/c[xX]/g, "\u0109");
    t = t.replace(/g[xX]/g, "\u011d");
    t = t.replace(/h[xX]/g, "\u0125");
    t = t.replace(/j[xX]/g, "\u0135");
    t = t.replace(/s[xX]/g, "\u015d");
    t = t.replace(/u[xX]/g, "\u016d");
    t = t.replace(/C[xX]/g, "\u0108");
    t = t.replace(/G[xX]/g, "\u011c");
    t = t.replace(/H[xX]/g, "\u0124");
    t = t.replace(/J[xX]/g, "\u0134");
    t = t.replace(/S[xX]/g, "\u015c");
    t = t.replace(/U[xX]/g, "\u016c");
    document.getElementById("q").value=t;
  }
}
//--></SCRIPT>

...

<!-- SiteSearch using Google -->
<FORM method=GET action="https://www.google.co.uk/search">
<input type=hidden name=ie value=UTF-8>
<input type=hidden name=oe value=UTF-8>
<TABLE bgcolor="#F7F9FD"><tr><td>
<A title= "google" HREF="https://www.google.co.uk/">
<IMG SRC="https://www.google.co.uk/logos/Logo_40wht.gif"
border="0" ALT="Google"></A>
</td>
<td>
<INPUT TYPE=text id="q" name=q onKeyUp="xAlUtf8(this.value)" size=31 maxlength=255 value="">
<INPUT type=submit name=btnG VALUE="Search">
<br> <input type="checkbox" id="x" checked>Convert cx -&gt; &#265; etc.<br>
<font size=-1>
<input type=hidden name=domains value="www.esperanto.org.uk;www.esperanto-gb.org"><br>
<!-- haven't found a way to tell Google to search multiple domains simultaneously-->
<input type=radio name=sitesearch value="esperanto.org.uk" checked> EAB (membership, organisation, bookshop, LBE, Update)<br>
<input type=radio name=sitesearch value=""> The whole World-Wide Web
</font>
</td>
</tr>
</TABLE>
</FORM>
<!-- end of SiteSearch Google -->

 

  • Thanks 1

Share this post


Link to post
Share on other sites

One possibility could be to have it as an option - I don't know how easy or otherwise Invision makes this, but if there was an extra toggle switch below the editor (next to "Correct my mistakes") for "Replace Xs", that could work nicely. The funny behaviour is probably a reasonable trade-off for the functionality if it can be enabled or disabled.

  • Like 1

Share this post


Link to post
Share on other sites

You could also try adapting the script from vortaro.net, which seems to merge 'x' or 'X' with the previous letter when you type it, but doesn't replace all "cx"s in the text, so you can still enter "cx" by pasting it or by inserting the "c" after you type the "x" or by deleting characters between a "c" and an "x", which is good, I think.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks to the genius that is @Martin Rue, we seem to have a solution.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use. Please familiarise yourself with our Guidelines for posting and consult our Privacy Policy to ensure that you're happy with how we use your information.