question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It Doesn't Work With Images

See original GitHub issue
var Floorplan = React.createClass({

  render: function() {
    var allBoothKeys = Object.keys(this.props.booths)
      , self = this
      , booths

    if (allBoothKeys.length < 1) return null

    booths = allBoothKeys.map(function(key) {
      return (<Booth key={key} booth={self.props.booths[key]} />)
    })

    return (
      <Draggable
        start={{ x: 0, y: 0 }}
      >
        <div>
          {booths}
        </div>
      </Draggable>
    )
  }
})

Works. But if, inside div, I add

<img id="layout" src="img/layout.png" />

Does something weird: the drag starts on mouse up and I have to click again to stop the drag.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10

github_iconTop GitHub Comments

33reactions
yujingzcommented, Jun 25, 2015

It’s because of the default HTML5 drag API. if you change your img tag to

<img id="layout" draggable="false" src="img/layout.png" />

it should work as expected

3reactions
TSMMarkcommented, Nov 20, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Images Not Loading in Chrome - Online Tech Tips
When Chrome doesn't display images on a site, switch to another web browser on your computer and see if you can load the...
Read more >
7 Ways to Fix Google Chrome Not Loading Images - MakeUseOf
Open Chrome's menu and head to Settings. From the left pane, click Privacy and security. Click Site Settings > Images. Below Default behavior, ......
Read more >
9 Fixes When Images Not Loading in Chrome - Help Desk Geek
9 Fixes When Images Not Loading in Chrome · 1. Try a Different Browser · 2. Check the Show All Images Option ·...
Read more >
Troubleshoot issues with Google Images - Google Search Help
If images don't show or are slow to load when you search on images.google.com, try the following steps. After each step, do an...
Read more >
5 Reasons Why Your Images Won't Load | SiteUptime Blog
1. Your Photos Are Too Large · 2. The Image Doesn't Exist · 3. Wrong Filename and Extension · 4. Local File Path...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found