on Safari Autocompleter ch: @ in Chinese IME is not working
See original GitHub issueWhat is the current behavior? Describe the bug
I’m working on tinymce use Autocompleter when user input @ can show some quickly function such as insert ‘hr’. I test on Chrome is ok whenerver Chinese IME or English IME but in Safari, it is not working on Chinese IME
Please provide the steps to reproduce and if possible a minimal demo of the problem via [fiddle.tiny.cloud]
var specialChars = [
{ text: 'exclamation mark', value: '!' },
{ text: 'at', value: '@' },
{ text: 'hash', value: '#' },
{ text: 'dollars', value: '$' },
{ text: 'percent sign', value: '%' },
{ text: 'caret', value: '^' },
{ text: 'ampersand', value: '&' },
{ text: 'asterisk', value: '*' }
];
tinymce.init({
selector: 'textarea#autocompleter',
height: 250,
setup: function (editor) {
/* An autocompleter that allows you to insert special characters */
editor.ui.registry.addAutocompleter('specialchars', {
ch: '@',
minChars: 0,
columns: 'auto',
fetch: function (pattern) {
var matchedChars = specialChars.filter(function (char) {
return char.text.indexOf(pattern) !== -1;
});
return new tinymce.util.Promise(function (resolve) {
var results = matchedChars.map(function (char) {
return {
value: char.value,
text: char.text,
icon: char.value
}
});
resolve(results);
});
},
onAction: function (autocompleteApi, rng, value) {
editor.selection.setRng(rng);
editor.insertContent(value);
autocompleteApi.hide();
}
});
},
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
});
What is the expected behavior?
-
[√ ] Chrome is ok
-
[ ×] Safari is not ok when Chinese IME
Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE?
- TinyMCE version:5.5.0
- Safari version:14.0 (15610.1.28.1.9, 15610)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
If AutoFill doesn't work in Safari on Mac - Apple Support
In the Safari app on your Mac, choose Safari > Settings, click AutoFill, then make sure “User names and passwords” is selected.
Read more >[Web] Character duplicating when using IME Chinese inputs ...
I cannot reproduce this issue on Chrome, so it's probably related to Safari. Steps to reproduce the issue: Enable Sucheng Input method (or...
Read more >Microsoft Traditional Chinese IME
This page helps you with how to use Microsoft Traditional Chinese IME including IME features and keyboard shortcuts.
Read more >What to do if Safari AutoFill is not working
If Safari AutoFill has stopped working on your Mac, you might be wondering what went wrong? We've got all the tips you need...
Read more >SpN - River Thames Conditions
2004 impala problems starting, Helios klinikum aue chirurgie! ... Hindi movie cocktail cast, Autocomplete vim typing, Nys tesol journal, Video ultraman vs ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @roy2651, as you’ve mentioned Safari is not firing the
keypress
norcompositionend
events, unlike every other browser. This is something we’ll need to address, but as a “hacky” workaround in the interim you could do something like this: https://fiddle.tiny.cloud/hxhaab. Anyways, I’ve logged this in our internal and we’ll let you know when a fix is available.等进度太慢,我直接改了源码,压缩后的,很痛苦