Add touch-screen dragging support for touch-screen devices#497
Open
dhruvDev23 wants to merge 1 commit into
Open
Add touch-screen dragging support for touch-screen devices#497dhruvDev23 wants to merge 1 commit into
dhruvDev23 wants to merge 1 commit into
Conversation
dhruvDev23
requested review from
chaitanyaenr,
paigerube14 and
shahsahil264
as code owners
May 21, 2026 16:32
✅ Deploy Preview for krkn-chaos ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Review Summary by QodoAdd touch-screen dragging support for chatbot widget
WalkthroughsDescription• Refactored drag handlers into reusable functions for unified mouse and touch support • Added touch event listeners for mobile and tablet device compatibility • Implemented touch-action: none CSS to prevent browser interference with dragging • Added passive: false option to enable preventDefault() on touch events Diagramflowchart LR
A["Mouse Events"] --> B["Unified Handlers"]
C["Touch Events"] --> B
B --> D["handleStart"]
B --> E["handleMove"]
B --> F["handleEnd"]
D --> G["Drag Logic"]
E --> G
F --> G
H["CSS touch-action: none"] --> I["Prevent Browser Interference"]
File Changes1. static/js/chatbot.js
|
Code Review by Qodo
1.
|
Signed-off-by: Dhruv Kumar <dhruvkumar82tapo1@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation Update
Related Feature:
This PR addresses a significant accessibility problem. The floating chatbot assistant widget was movable on desktop devices with mouse interactions. However, it was completely still and non-interactive on mobile, tablet, and touch-screen laptop screens.
Changes:
static/js/chatbot.jsinto reusable helper functions (handleStart,handleMove, andhandleEnd) to support unified mouse and touch input.touchstart,touchmove,touchend, andtouchcancel) on the chatbot header.e.preventDefault()inside thetouchstartlistener to block default browser touch actions (such as standard scrolling or cursor focus) when dragging is initiated.touch-action: none;to the.krkn-chat-headerclass instatic/css/chatbot.css. This prevents modern mobile browsers from panning/scrolling the underlying page and prematurely canceling the swipe gestures.