#ux 8 articles
- stopPropagation in onClick does not stop the keyboard — a clickable row swallows Enter and Space of the buttons inside itgotchas / spfxA clickable row with onKeyDown also receives the Enter/Space of its inner buttons and checkboxes, so their action is cancelled (or runs twice) and the detail opens; react only when e.target === e.currentTarget
- A docked side panel floats in mid-air on the newer SharePoint layout: .sp-App-bodyContainer is not theregotchas / spfxA Copilot-style side panel narrows the SharePoint page by shrinking .sp-App-bodyContainer. On the newer page chrome (left app bar with Discover/Publish/Build) that container does not exist, so the docking code silently…
- A mailto: fallback that reuses the success state tells the user their message was sent when it wasn'tgotchas / graphsendMail fails on accounts without a mailbox and the fallback only hands a draft to a mail client; model sent / handed off / failed, never a boolean
- Portaled overlays sit outside your CSS reset — hello, phantom scrollbargotchas / spfxPortal to body escapes the scoped reset; content-box fields overflow and grow a scrollbar
- position:fixed dropdowns go off-screen inside animated panels — the CSS transform trapgotchas / spfxThe CSS transform containing-block trap; portal to document.body
- Printing from a web part gives a blank page when the print CSS hides body > * and the print layer lives inside the web partgotchas / spfxOne way to print a report from an SPFx web part is to hide everything in print (body > * { display: none }, so the SharePoint suite bar, navigation and footer stay out) and show only a dedicated print layer. If that…
- SharePoint's SPA router hijacks anchor clicks — onClick never firesgotchas / spfxnavigates before React onClick runs; use buttons for in-app actions
- View counts and ratings written by readers cannot live in a list only editors may writegotchas / listsViews and ratings are written by the reader, so on a WriteSecurity: 4 content list every click is a swallowed 403 while the UI says thanks