etherpad-lite/src/static/js
John McLear a42e072900
fix: wait for server confirmation before navigating after pad delete (#7432)
* fix: wait for server confirmation before navigating after pad delete

The delete pad handler navigated to '/' immediately after sending the
PAD_DELETE message. Firefox (and some mobile Chrome) would close the
WebSocket before the message reached the server, causing the delete to
silently fail.

Now the client waits for the server's {disconnect: 'deleted'} response
before navigating. Also awaits pad.remove() on the server side to
ensure the operation completes before the response is sent.

Fixes: https://github.com/ether/etherpad-lite/issues/7306
Fixes: https://github.com/ether/etherpad-lite/issues/7311

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: handle non-creator delete and add timeout fallback

- Listen for 'shout' event to show error when non-creator tries to
  delete (server sends shoutMessage instead of deleting)
- Add 5-second timeout fallback in case the server doesn't respond
  (socket dropped, server crashed, etc.)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 07:12:46 +01:00
..
pluginfw Enforce 2-space indentation across codebase (#7426) 2026-04-01 19:48:45 +01:00
types feat(pad-settings): added possibility to delete pad by the creator (#6730) 2024-10-28 21:56:10 +01:00
vendors feat: started with recent pads implementation 2025-08-01 21:42:05 +02:00
ace.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
ace2_common.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
ace2_inner.ts Do not respond to right alt (Alt Gr) keyboard events. 2025-06-28 12:06:01 +02:00
AttributeManager.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
AttributeMap.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
AttributePool.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
attributes.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
basic_error_handler.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
broadcast.ts Fix revision loading for timeslider having revision count multiple of 100 (#6652) 2024-09-10 20:01:32 +00:00
broadcast_revisions.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
broadcast_slider.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
Builder.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
caretPosition.ts Feat/bundle js (#6511) 2024-07-18 08:51:30 +02:00
Changeset.ts build(deps): bump jose from 5.10.0 to 6.0.12 (#7049) 2025-08-04 19:21:59 +02:00
changesettracker.ts Fixed document not accessible in iframe (#6642) 2024-09-09 11:26:12 +02:00
ChangesetUtils.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
chat.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
ChatMessage.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
collab_client.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
colorutils.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
contentcollector.ts fix: prevent crash when pasting bare <li> without parent list element (#7431) 2026-04-03 07:11:08 +01:00
cssmanager.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
domline.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
index.ts Fixed index html page 2024-07-23 18:14:49 +02:00
l10n.ts feat: started with recent pads implementation 2025-08-01 21:42:05 +02:00
linestylefilter.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
MergingOpAssembler.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
Op.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
OpAssembler.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
OpIter.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
pad.ts chore: add button to settings popup for dark mode (#7136) 2025-09-23 17:41:22 +02:00
pad_automatic_reconnect.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
pad_connectionstatus.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
pad_cookie.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
pad_editbar.ts Fix frontend test failures across all browsers (#7416) 2026-04-01 09:07:45 +01:00
pad_editor.ts fix: wait for server confirmation before navigating after pad delete (#7432) 2026-04-03 07:12:46 +01:00
pad_impexp.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
pad_modals.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
pad_savedrevs.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
pad_userlist.ts chore: fixed recentPads being null 2025-08-12 21:44:28 +02:00
pad_utils.ts Bump dev dependencies including TypeScript 5→6 with compatibility fixes (#7428) 2026-04-01 20:43:21 +01:00
rjquery.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
scroll.ts feat: continued with pad link functionality 2025-08-01 21:42:05 +02:00
security.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
skin_variants.ts chore: add button to settings popup for dark mode (#7136) 2025-09-23 17:41:22 +02:00
skiplist.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
SmartOpAssembler.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
socketio.ts fix(socket.io): readd long polling 2025-03-13 14:32:00 +01:00
StringAssembler.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
StringIterator.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
TextLinesMutator.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
timeslider.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
underscore.ts Moved to ts (#6593) 2024-08-17 20:14:36 +02:00
undomodule.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
welcome.ts 7139 let user maintain a single session across multiple browsers (#7228) 2025-11-18 12:23:55 +01:00