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

jQuery 1.9/2.0 support #518

Closed
geriamir opened this issue Jan 16, 2013 · 24 comments
Closed

jQuery 1.9/2.0 support #518

geriamir opened this issue Jan 16, 2013 · 24 comments

Comments

@geriamir
Copy link

We've tested SlickGrid with jQuery 1.9 and found it is incompatible.
What first jumped to our notice is that SlickGrid uses $.browser which was removed from the new releases and move into independent jQuery plugin.

@ghedwards
Copy link

Perhaps ($.browser.mozilla) could be replaced with ('MozBoxSizing' in document.documentElement.style) ?

and

($.browser.msie) with ('msTransform' in document.documentElement.style) ?

@markushausammann
Copy link

Yes, slickgrid needs to hold pace with jQuery or this great tool becomes obsolete!

@FGRibreau
Copy link

+1

@sparmboy
Copy link

sparmboy commented Feb 4, 2013

+1

I've also found an issue with the column resizing and jQuery 1.9.0. Issues #462 and #484 touched on it but havent fixed it.

It's easy to replicate with the latest code and the examples.

  1. Download the latest slickgrid code and run example2-formatters.html. Check the columns can be resized ok.
  2. Place jquery-1.9.0.js under the lib dir
  3. Edit example2-formatters.html to import jquery-1.9.0.js instead of jquery-1.7.min.js
  4. Re-run the page. In chrome v24 the grid displays but the columns no longer resize and the following errors are logged each time:

    Uncaught TypeError: Cannot call method 'call' of undefined - jquery.event.drag-2.0.min.js:6

    Uncaught TypeError: Cannot read property 'msie' of undefined - jquery-ui-1.8.16.custom.min.js:48

    Worse, in IE8 (the version we have to support :( ) the grid fails to display completely.

I can work around this by tweaking jquery.event.drag-2.0.js (line 278) as follows:

From:

result = subject ? $event.handle.call( subject, event, callback ) : null;

To:

result = subject ? $event.handlers.call( subject, event, callback ) : null;

But Id prefer not to be hacking the jquery code.

Any idea when we can get support for this?

@Mogglewump
Copy link

You can update to the latest version of jquery UI, 1.10, and jquery.event.drag, version 2.2 I believe, and it solves this issue.

@hlascelles
Copy link

@Mogglewump is quite correct. You can get it here: http://threedubmedia.com/code/event/drag.

I also found I have to retrofit $.browser support, which can be done either using the full jquery migrate plugin, or just the one browser method as shown here: http://stackoverflow.com/questions/14545023/jquery-1-9-browser-detection

@sparmboy
Copy link

sparmboy commented Feb 4, 2013

The move to jquery.event.drag.2.2 resolved it for us thanks!

@markushausammann
Copy link

Bump! Is slickgrid dead?

@martino
Copy link

martino commented Apr 25, 2013

+1

@mleibman
Copy link
Owner

As far as I know, there are no more existing incompatibilities with jQuery 1.9/2.0.

@RicSwirrl
Copy link

excellent. Thanks for keeping it compatible! 👍

@martino
Copy link

martino commented Apr 29, 2013

Thanks!

@rhosford
Copy link

I am confused. My version of jquery.event.drag.2.2, which got from the link provided above, clearly states at the top of the file that it requires jquey 1.7.X -- and it only works for me with 1.7 -- the grid fails to load with 1.9

What am I missing here?

@coryasilva
Copy link

Awesome! Thank you for your time.

@romaricdrigon
Copy link

Hi,

With SlickGrid 2.0.2 & jQuery 1.10.1, I am having an issue:

    function getMaxSupportedCssHeight() {
      var supportedHeight = 1000000;
      // FF reports the height back but still renders blank after ~6M px
      var testUpTo = ($.browser.mozilla) ? 6000000 : 1000000000;

Indeed $.browser was deprecated and removed in jQuery 1.9. We can use the migrate plugin, but I'm not sure it's a good thing. Are they any plan to rewrite this in the future?

@coryasilva
Copy link

I just extended jQuery with the code below; although it does not directly answer your question it will definitely fix the problem with as few lines of code as possible.

jQuery.browser = {};
jQuery.browser.mozilla = /mozilla/.test(navigator.userAgent.toLowerCase()) && !/webkit/.test(navigator.userAgent.toLowerCase());
jQuery.browser.webkit = /webkit/.test(navigator.userAgent.toLowerCase());
jQuery.browser.opera = /opera/.test(navigator.userAgent.toLowerCase());
jQuery.browser.msie = /msie/.test(navigator.userAgent.toLowerCase());

@mleibman
Copy link
Owner

Get the latest SlickGrid code.

@SimplGy
Copy link

SimplGy commented Dec 4, 2013

Hi @mleiban -- Not sure I understand the issue resolution here. I recognize I'm coming in 6 months later so I'm probably missing something. Latest versions of jquery don't include $.browser and the latest build of slickgrid that I pull down from bower (v2.0.2) still depends on it.

Am I on an old version of slickgrid?
Should I use a monkey patch to fill in $.browser support?

I can resolve this by depending on jquery#1.8.3, but would like to use jquery latest stable.

@SimplGy
Copy link

SimplGy commented Dec 4, 2013

I see -- bower pulls down old code because there hasn't been a release tag in a while. Maybe just tagging off the 2.1 version, if it's pretty stable? Would resolve this $.browser issue and also the broken inertial scrolling in osx webkit: 34d768d

@mleibman
Copy link
Owner

mleibman commented Dec 4, 2013

2.1 has been tagged a while ago and is stable.
(sorry about this omission - I originally just branched it and cut the release off of that; didn't know that others depended on tags...)

@SimplGy
Copy link

SimplGy commented Dec 4, 2013

I see that github has the 2.1 tag, but bower does not identify it. The result is that folks using bower are getting an old version. Here is what bower sees for available versions:

$ bower info slickgrid

bower info slickgrid
bower slickgrid#*           not-cached git://github.com/mleibman/SlickGrid.git#*
bower slickgrid#*              resolve git://github.com/mleibman/SlickGrid.git#*
bower slickgrid#*             download https://github.com/mleibman/SlickGrid/archive/2.0.2.tar.gz
bower slickgrid#*              extract archive.tar.gz
bower slickgrid#*             resolved git://github.com/mleibman/SlickGrid.git#2.0.2

{
  name: 'slickgrid',
  homepage: 'https://github.com/mleibman/SlickGrid',
  version: '2.0.2'
}

Available versions:
  - 2.0.2
  - 2.0.1
  - 1.4.3
  - 1.4.1
  - 1.3.2

I'm unsure if this is related to a semver formatting issue or what but I'm looking at it now...

@mleibman
Copy link
Owner

mleibman commented Dec 4, 2013

I'm not familiar with bower.
On Dec 4, 2013 1:02 PM, "Eric" notifications@github.com wrote:

I see that github has the 2.1 tag, but bower does not identify it. The
result is that folks using bower are getting an old version. Here is what
bower sees for available versions:

$ bower info slickgrid

bower info slickgrid
bower slickgrid#* not-cached git://github.com/mleibman/SlickGrid.git#*
bower slickgrid#* resolve git://github.com/mleibman/SlickGrid.git#*
bower slickgrid#* download https://github.com/mleibman/SlickGrid/archive/2.0.2.tar.gz
bower slickgrid#* extract archive.tar.gz
bower slickgrid#* resolved git://github.com/mleibman/SlickGrid.git#2.0.2

{
name: 'slickgrid',
homepage: 'https://github.com/mleibman/SlickGrid',
version: '2.0.2'
}

Available versions:

  • 2.0.2
  • 2.0.1
  • 1.4.3
  • 1.4.1
  • 1.3.2

I'm unsure if this is related to a semver formatting issue or what but I'm
looking at it now...


Reply to this email directly or view it on GitHubhttps://github.com//issues/518#issuecomment-29845183
.

@SimplGy
Copy link

SimplGy commented Dec 4, 2013

Bower is a really handy tool for transporting dependencies to your app--npm for the front end. Nice to learn because it saves us a lot of time but you shouldn't need to do anything specific to support it. It does seem likely that there's something non-standard about your version tags. I'm suspicious of 2.02 (without a dot).

Interesting clue: the git UIs sort 2.02 before 2.1:

Gitbox:
image

Github:
image

I wonder if this is related to why bower picks 2.0.2 instead of 2.1? Maybe it stops reading at an invalid semver tag? I've opened a related issue with the bower team here: bower/bower#993

@danbroun
Copy link

danbroun commented Dec 5, 2013

I tried to update to jQuery 2. After that column resizing did not work anymore.
So my setup is:
'bower_components/jquery/jquery.min.js',
'bower_components/slickgrid/lib/jquery-ui-1.8.16.custom.min.js',
'bower_components/slickgrid/lib/jquery.event.drag-2.2.js',
'bower_components/slickgrid/lib/jquery.event.drop-2.2.js',
'bower_components/slickgrid/slick.core.js',
'bower_components/slickgrid/slick.dataview.js',
'bower_components/slickgrid/slick.grid.js',

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