From 7510ef3670f6544536bdacd177c97c72726df938 Mon Sep 17 00:00:00 2001 From: Peter Foster Date: Wed, 21 Jan 2026 10:53:13 +0000 Subject: [PATCH] Fix text cursor appearing on non-editable elements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add universal cursor inherit rule for consistent cursor behavior - Add user-select: none to prevent text selection on UI elements - Expand element coverage to include modals, tooltips, and inline elements - Preserve text cursor and selection for form inputs with !important 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/TrueCV.Web/wwwroot/app.css | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/src/TrueCV.Web/wwwroot/app.css b/src/TrueCV.Web/wwwroot/app.css index 0a04412..766279d 100644 --- a/src/TrueCV.Web/wwwroot/app.css +++ b/src/TrueCV.Web/wwwroot/app.css @@ -86,7 +86,12 @@ html, body { cursor: default; } -/* Prevent text cursor on non-editable elements */ +/* Universal default cursor - prevents text cursor on non-editable elements */ +* { + cursor: inherit; +} + +/* Prevent text cursor and selection on non-editable elements */ h1, h2, h3, h4, h5, h6, p, span, div, section, article, header, footer, nav, main, aside, label, li, ul, ol, table, tr, td, th, thead, tbody, tfoot, img, svg, picture, figure, path, circle, rect, line, polyline, polygon, ellipse, g, use, text, tspan, @@ -94,15 +99,32 @@ path, circle, rect, line, polyline, polygon, ellipse, g, use, text, tspan, .breadcrumb, .breadcrumb-item, .progress, .progress-bar, .spinner-border, .score-ring, .score-ring-container, .stat-card, .stat-item, .feature-card, .employment-row, .timeline-segment, .file-type-icon, -[role="status"], [role="progressbar"] { +[role="status"], [role="progressbar"], [role="presentation"], +.modal, .modal-content, .modal-header, .modal-body, .modal-footer, +.tooltip, .popover, .dropdown-menu, .list-group-item, +small, strong, em, b, i, u, mark, del, ins, sub, sup, code, pre, blockquote, +::before, ::after { cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } -/* Ensure form inputs still have text cursor */ +/* Ensure form inputs still have text cursor and text selection */ input[type="text"], input[type="email"], input[type="password"], input[type="search"], -input[type="url"], input[type="tel"], input[type="number"], textarea, select, +input[type="url"], input[type="tel"], input[type="number"], textarea, [contenteditable="true"] { - cursor: text; + cursor: text !important; + -webkit-user-select: text !important; + -moz-user-select: text !important; + -ms-user-select: text !important; + user-select: text !important; +} + +/* Select dropdowns need auto cursor */ +select { + cursor: pointer !important; } /* Checkboxes should have pointer cursor */