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

1.0.0-b2 aborts any running AJAX requests #193

Closed
EreMaijala opened this Issue Oct 1, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@EreMaijala

EreMaijala commented Oct 1, 2015

Interacting with geomap e.g. by using .geomap('option', 'center', [27, 60]); aborts any running AJAX requests. 1.0.0-b1.5 seems to work properly. Tested with both Firefox 41.0.1 and Chrome 45.0.2454.101 (Mac OS X).

Here is a simple jsfiddle that demonstrates the issue: http://jsfiddle.net/eremaijala/ybLzab8c/1/
Here is a jsfiddle with the older b1.5 version that works: http://jsfiddle.net/eremaijala/twt13ws3/1/

@ryanttb

This comment has been minimized.

Show comment
Hide comment
@ryanttb

ryanttb Oct 2, 2015

Contributor

Very true! It seems this is a side effect of our attempts to cancel image loading if you change the bbox of the map in any way, e.g., the user pans manually or you change center/zoom/etc via code.

if ( window.stop !== undefined ) {
  window.stop();
} else if( document.execCommand !== undefined ) {
  document.execCommand("Stop", false);
}

I hope there's a clean work around because it's a nice UX feature.

Contributor

ryanttb commented Oct 2, 2015

Very true! It seems this is a side effect of our attempts to cancel image loading if you change the bbox of the map in any way, e.g., the user pans manually or you change center/zoom/etc via code.

if ( window.stop !== undefined ) {
  window.stop();
} else if( document.execCommand !== undefined ) {
  document.execCommand("Stop", false);
}

I hope there's a clean work around because it's a nice UX feature.

@ryanttb

This comment has been minimized.

Show comment
Hide comment
@ryanttb

ryanttb Oct 2, 2015

Contributor

Also, thanks @EreMaijala for testing the library & finding this bug!

Contributor

ryanttb commented Oct 2, 2015

Also, thanks @EreMaijala for testing the library & finding this bug!

@ryanttb ryanttb added this to the 1.0.0-b3 milestone Oct 8, 2015

@ryanttb

This comment has been minimized.

Show comment
Hide comment
@ryanttb

ryanttb Oct 8, 2015

Contributor

At the very least for b3, we should disable this until we can be sure to not cancel other AJAX requests in the process.

Contributor

ryanttb commented Oct 8, 2015

At the very least for b3, we should disable this until we can be sure to not cancel other AJAX requests in the process.

ryanttb added a commit to ryanttb/geo that referenced this issue Oct 11, 2015

@ryanttb ryanttb closed this Oct 11, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment