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 6665871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:46:08+00:00 2026-05-26T02:46:08+00:00

just as it states. how do you disable the drag image. I have a

  • 0

just as it states. how do you disable the drag image. I have a floating panel and the drag image looks very bad. no-jquery please.

  • 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-05-26T02:46:08+00:00Added an answer on May 26, 2026 at 2:46 am

    From MDN:

    If the node is an HTML img element, an HTML canvas element or a XUL image element, the image data is used. Otherwise, image should be a visible node and the drag image will be created from this.

    From this it would follow that to “turn off” the drag image you should just pass an empty (but visibile) element to setDragImage. How about this:

    // create an empty <span>
    var dragImgEl = document.createElement('span');
    
    // set its style so it'll be effectively (but not technically) invisible and
    // won't change document flow
    dragImgEl.setAttribute('style',
      'position: absolute; display: block; top: 0; left: 0; width: 0; height: 0;' );
    
    // add it to the document
    document.body.appendChild(dragImgEl);
    
    // your DataTransfer code here--assume we put it in a variable called 'dt'
    
    dt.setDragImage(dragImgEl, 0, 0);
    

    If an empty <span> doesn’t work for some reason you could always use <img src="blank.png"/> where blank.png is a transparent 1-pixel PNG. Hope that helps!

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

Sidebar

Related Questions

im just building a very simple event based proxy monitor top disable the proxy
I have UIButton that I set the background image for three states, normal, highlighted,
Just a quick question of concern- the latest xcode and iphone sdk states 'Snow
I've just found out about View States in Flex (v3.0), but I am not
I have just, in my groggy morning state, reversed & confused the arguments to
i have a problem just as title, and the http-status is 302 Moved Temporarily.
I have just become involved in migrating a series of complex workflows with InfoPath
I have a Composite that I want to be able to enable/disable programatically. The
I have a <select> field. <select name=select-states disabled=disabled><option value=>Choose State &raquo;</option></select> I would like
I would like to have a very lightweight ASP.NET MVC site which includes removing

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.