rails / jquery-rails

A gem to automate using jQuery with Rails
MIT License
948 stars 406 forks source link

Cross-domain check breaks in IE #200

Closed lgustafson closed 9 years ago

lgustafson commented 9 years ago

The new cross-domain check from 11ad7bc5211b02aad131ae9d009ced2164f4b975 with IE7 and in IE compatibility mode always returns true when a form action is a path with no protocol or port. This behavior prevents forms from being submitted in this scenario. It appears that the cross-domain check depends on certain behavior that is not present in IE7 (or compatibility mode in later versions). Namely, it assumes that when an anchor element's href property is set, that it will be converted to a fully qualified URL including protocol and hostname, and that these corresponding properties are set. IE7 and compatibility mode does not convert the path to a fully qualified URL.

I would argue that within the function a partial URL missing the protocol and hostname should indicate that a cross-domain request is not being made.

rafaelfranca commented 9 years ago

Closing in favor of https://github.com/rails/jquery-ujs/issues/426