Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragging and resizing is not working on IE11 #29

Closed
alanrubin opened this issue Feb 5, 2015 · 16 comments
Closed

Dragging and resizing is not working on IE11 #29

alanrubin opened this issue Feb 5, 2015 · 16 comments

Comments

@alanrubin
Copy link

First thanks for the great library !

Currently dragging and resizing is not working in M$ IE11 (running on a Windows 7 VM). You can easily reproduce by trying to run the showcase demo in IE11 - https://strml.github.io/react-grid-layout/examples/0-showcase.html .

The problem seems to rely on react-draggable component and the way it detects if the device is a touch one. We found that by modifying draggable.js file (/node_modules/react-grid-layout/node_modules/react-draggable/lib/draggable.js) so that isTouchDevice is always false solve the problem.

So instead of having:

// @credits: http://stackoverflow.com/questions/4817029/whats-the-best-way-to-detect-a-touch-screen-device-using-javascript/4819886#4819886
/* Conditional to fix node server side rendering of component */
if (typeof window === 'undefined') {
    // Do Node Stuff
    var isTouchDevice = false;
} else {
    // Do Browser Stuff
    var isTouchDevice = 'ontouchstart' in window || // works on most browsers
      'onmsgesturechange' in window; // works on ie10 on ms surface
}

we do

var isTouchDevice = false;

the problem is fixed.

This seems to be a problem with touch detection in IE11 and probably must be fixed in react-draggable but just want to make sure people are aware of the problem and temporary solution. I will try to investigate the best solution and open an issue for react-draggable.

@browniefed
Copy link
Contributor

I wonder if this can be solved with React.initializeTouchEvents and not worry about checking for this sort of stuff.

@STRML
Copy link
Collaborator

STRML commented Feb 6, 2015

That is a good point. Could you forward this on as a react-draggable issue?

@dalehille
Copy link

@STRML do you know if the react-draggable issue was ever submitted? I saw you submitted react-grid-layout/react-draggable#33 but I wasn't sure if that was supposed to fix the ie11 issue or something else.

@andrewmclagan
Copy link

This still seems to be a problem on 0.9.1 and master

Any progress?

@andrewmclagan
Copy link

Awesome! will check it out later today. Very appreciated.

@STRML
Copy link
Collaborator

STRML commented Jun 4, 2015

Having some issues with the upgrade due to other changes in react-draggable. Working on it.

@jgwconsulting
Copy link

Hi @STRML, at the risk of being deeply annoying, I was wondering if you have a feel for how difficult it will be to solve the IE11 issue? RGL is really good - much better than any of the other Packery style offerings (including Packery itself).

@STRML
Copy link
Collaborator

STRML commented Aug 27, 2015

@jgwconsulting I've definitely dropped the ball on this - work is about 80% done but I have to work out some compatibility bugs. My day job has taken up all of my time lately.

I want to use RGL in production (that's what I built this for) so the next release (0.11) is a priority. Hoping to bang it out within the next week.

@jgwconsulting
Copy link

I'm amazed you have time to create this as well as holding down a day job, sleeping and stuff like that :) Great news that you're nearly there. I'll swap out Packery for RGL in a heartbeat in a dashboard app I'm working on so you have my sincere gratitude!

@STRML
Copy link
Collaborator

STRML commented Aug 27, 2015

Thanks - yeah, issue is that I've been between traveling and presentations as well - so life has been a whirlwind the last few months. My day job is bitmex.com so it's eventually going to make it into that app. I've definitely been slacking on this and I want it to hit production so it'll move forward shortly.

@jgwconsulting
Copy link

Yes, I saw your screenshot of Bitmex - that's a nice looking dashboard. It
must be an exciting area to work in too.

I work for part of Avid (they do video, audio, broadcast related stuff),
currently developing a dashboard to monitor all our various services and
Rabbit MQ based workflow. At the moment I'm using something called Golden
Layout for panels and Packery for widget layout within the panels (I do
write some of my own code, honestly!) but RGL is streets ahead.

Anyway, don't kill yourself getting it fixed!
On 27 Aug 2015 23:04, "Samuel Reed" notifications@github.com wrote:

Thanks - yeah, issue is that I've been between traveling and presentations
as well - so life has been a whirlwind the last few months. My day job is
bitmex.com https://www.bitmex.com so it's eventually going to make it
into that app. I've definitely been slacking on this and I want it to hit
production so it'll move forward shortly.


Reply to this email directly or view it on GitHub
#29 (comment)
.

@kumarharsh
Copy link

@STRML @alanrubin I'd like to update you that the Modernizr test for detecting touchevents is updated to be this:

define(['Modernizr', 'prefixes', 'testStyles'], function(Modernizr, prefixes, testStyles) {
  // Chrome (desktop) used to lie about its support on this, but that has since been rectified: http://crbug.com/36415
  Modernizr.addTest('touchevents', function() {
    var bool;
    if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
      bool = true;
    } else {
      var query = ['@media (', prefixes.join('touch-enabled),('), 'heartz', ')', '{#modernizr{top:9px;position:absolute}}'].join('');
      testStyles(query, function(node) {
        bool = node.offsetTop === 9;
      });
    }
    return bool;
  });
});

@palnes
Copy link

palnes commented Oct 23, 2015

Any updates on this? Tried building 0.9.2, but still no go in IE11 it seems.

@jolyonruss
Copy link

@STRML d'you have a branch or work in progress fix for this that someone else could pick up and complete? You mentioned that it's 80% done, can we help with the extra 20% and get this working in IE?

@STRML
Copy link
Collaborator

STRML commented Feb 10, 2016

This is fixed in 0.10.

@STRML STRML closed this as completed Feb 10, 2016
@andrewmclagan
Copy link

awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants