Changeset c01f471 in Klonkt for src/views/pages/post-edit.ejs


Ignore:
Timestamp:
06/19/2026 12:32:57 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
f3f43df
Parents:
9217e4e
Message:

feat(editor): always type fullscreen on mobile/tablet (touch)

On pointer:coarse devices the editor automatically goes fullscreen when
the writing field receives focus → distraction-free typing with the
toolbar pinned above the keyboard, no page jump. Exit via the button or
Escape; tapping the field again re-enters fullscreen. Desktop unchanged.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/post-edit.ejs

    r9217e4e rc01f471  
    12621262  });
    12631263
     1264  // Op mobiel/tablet (touch-apparaat = pointer:coarse) gebeurt typen ALTIJD
     1265  // fullscreen: zodra het schrijfveld focus krijgt, gaan we automatisch fullscreen.
     1266  // Eruit kan met de knop (⤡) of Escape; tik je weer in het veld → opnieuw fullscreen.
     1267  var isTouch = window.matchMedia && window.matchMedia('(pointer: coarse)').matches;
     1268  if (isTouch) {
     1269    editor.addEventListener('focus', function () {
     1270      if (editorFrame && !editorFrame.classList.contains('pe-fs')) toggleFullscreen();
     1271    });
     1272  }
     1273
    12641274  // Reflect bold/italic/list state on the toolbar buttons
    12651275  function updateToolbarState() {
Note: See TracChangeset for help on using the changeset viewer.