converse.js
converse.js copied to clipboard
Leave the page when entering a spoiler hint without a hidden message and pressing the ENTER key
Describe the bug In my configuration, the chat is running in the following URL: https://example.com/?chat When using incorrectly the spoiler toolbar button by typing a spoiler hint and pressing the ENTER key (so with an empty hidden message), it leaves the page and goes to https://example.com/?
To Reproduce Steps to reproduce the behavior:
- Configure your application to run conversejs v9.1.1 on https://example.com/?chat so it automatically join a MUC room (see converse configuration below).
- Click on the spoiler toolbar button.
- Enter a spoiler hint and press the ENTER key (so the hidden message is empty).
- See error
Expected behavior I expect to not do anything when I press the ENTER key, like when you click on the send button.
Environment (please complete the following information):
- Desktop and Mobile
- All browsers I tested with [Chrome, Firefox, Edge, Safari]
- Converse.js version: 9.1.1
Additional context See the converse configuration I use if it may help to reproduce the bug:
"allow_contact_requests": false,
"allow_logout": false,
"allow_muc_invitations": false,
"allow_user_trust_override": "off",
"assets_path": "/conversejs/",
"authentication": "anonymous",
"auto_login": true,
"auto_join_rooms": [ "[email protected]" ],
"clear_cache_on_logout": true,
"discover_connection_methods": false,
"enable_smacks": false,
"hide_muc_server": true,
"jid": "example.com",
"keepalive": false,
"locked_muc_nickname": true,
"message_archiving": "never",
"muc_disable_slash_commands": true,
"notify_all_room_messages": [ "[email protected]" ],
"persistent_store": "sessionStorage",
"play_sounds": true,
"sounds_path": "/conversejs/sounds/",
"strict_plugin_dependencies": false,
"singleton": true,
"view_mode": "embedded",
"websocket_url": "wss://server-1.example.com/ws/"