radiac / django-tagulous

Fabulous Tagging for Django
http://radiac.net/projects/django-tagulous/
Other
336 stars 66 forks source link

Problem in entering composed characters such as Chinese #138

Closed andyfoundi closed 3 years ago

andyfoundi commented 3 years ago

In the dropdown tag selection input field on the UI, when entering Chinese tags, users are not able to enter characters properly in Chrome.

When entering tags with composed characters such as Chinese, the input method displays "composing units" in the input box, then composes the units into the desired characters. For example, if "ㄉㄨㄥˋ" is entered, it is composed into the desired character, "動". "ㄉㄨㄥˋ" should be in a temporary state before it is actual entered in the input box. However, the temporary state will be entered instead now. So we can only get "ㄉㄨㄥˋ" as our tag, instead of "動".

OS: MacOS Browser: Chrome Version: django-tagulous==1.2.1, Django==3.2.7

It works fine in Safari.

截圖 2021-09-03 上午10 11 27

radiac commented 3 years ago

Thanks for reporting this. I haven't got any experience with composed characters; I'll read up on it, but may need some help!

It looks like this might be an issue with select2: https://github.com/select2/select2/issues/5837

Do you see the same problem here? https://select2.org/tagging#tagging-with-multi-value-select-boxes

andyfoundi commented 3 years ago

re: Do you see the same problem here? It seems to work fine on the page you provided. 截圖 2021-09-03 下午5 10 32

You might be able to reproduce it using Mac/Chrome and change the input to Chinese. Any random input will interrupt the IME unexpectedly similar to what the bug mentions (select2/select2#5837)

re: It looks like this might be an issue with select2: select2/select2#5837 Indeed very similar.

radiac commented 3 years ago

Thanks for testing! I've just released Tagulous v1.3.0, where I've upgraded select2 to the version on their docs which I linked to.

Closing this issue as hopefully this will fix it, but do reopen if it's still not working!

andyfoundi commented 3 years ago

Thanks for checking it out.

I tried upgrading to 1.3.0, however, the problem still persist. Any way I can test more?

root@devcrm:/crm/django# pip freeze | grep tagulous
django-tagulous==1.3.0

截圖 2021-09-13 上午10 50 08 截圖 2021-09-13 上午10 53 03 截圖 2021-09-13 上午10 56 54

Is it because the select2 version is incorrect (4.0.13)?