Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9115875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:32:13+00:00 2026-06-17T04:32:13+00:00

Interesting glitch. It turns out that if you try to use CSS to style

  • 0

Interesting glitch. It turns out that if you try to use CSS to style the cursor (as in to hide or use a crosshair cursor), when you fire an onmousedown event, the cursor is changed to a text cursor.

Here’s a code snippet from the Experiment where I noticed this:

mouse=[[0,0],false];
snap_mouse_by=10;
canvas.onmousedown=function(evt){
    var X=evt.clientX,Y=evt.clientY;
    mouse[0]=[X-X%snap_mouse_by,Y%Y-snap_mouse_by];
    //set mouse coordinates
    mouse[1]=true;
    //set mouse is down to true
}

Along with this, a self-executing function runs and checks for the mouse coordinates and whether the mouse is down or not. Based on this data, it draws a box.

Of course, when I hit the mouse button, the cursor’s style goes to text instead of doing nothing.

No need to answer this question, answer is below.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:32:14+00:00Added an answer on June 17, 2026 at 4:32 am

    I did a quick google search to see if I was doing the CSS wrong, or if there’s a documented bug.

    I found nothing, but then got an idea that should seem pretty obvious.

    canvas.onmousedown=function(evt){
        ...
        evt.preventDefault();
        return false;
    }
    

    I tested that out to see if it was a browser function causing the CSS inconsistency, and it worked like a charm, I now have full control of the cursor’s style.

    Here’s the link, if anyone’s curious.

    Just thought I’d share this in case anyone else runs into this glitch.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

An interesting use case has popped up for us, we are requiring that when
I am interesting in looking at ways that I could improve the use of
So I have an interesting use case that I'm stuck trying to find a
One of my team has recently come across an interesting glitch in the matrix.
Interesting one here. I have an ASP.NET 1.1 project that contains a web service
An interesting question arose today. Let's say I have a .NET object that implements
I've seen some interesting ways to handle strings with Linq: For example, to hide
I came across something interesting that I can't seem to find any more information
I had an interesting (potentially stupid) idea: What happens if I use a built-in
I have this kinda interesting requirement. Typically you use XSLT to transform an XML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.