プロジェクト

全般

プロフィール

Vote #73797

完了

Broken javascript in IE7 ; recurrence of #12195

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
高め
担当者:
-
カテゴリ:
UI_10
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
10
version_id:
71
issue_org_id:
13811
author_id:
56941
assigned_to_id:
0
comments:
2
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
60
ステータス-->[Closed]

説明

This is a recurrence of #12195 caused by a stray comma in application.js (as detailed below).

In 'public/javascripts/application.js'



function observeAutocompleteField(fieldId, url, options) {
  $(document).ready(function() {
    $('#'+fieldId).autocomplete($.extend({
      source: url,
      minLength: 2,
      search: function(){$('#'+fieldId).addClass('ajax-loading');},
      response: function(){$('#'+fieldId).removeClass('ajax-loading');},
    }, options));                                                      ^ extra comma that IE 7 hates
    $('#'+fieldId).addClass('autocomplete');
  });
}

This breaks the subsequent loading of all other functions in application.js, which halts most Javascript execution because adding warnLeavingUnsavedMessage to the window.load event is the first thing every page does.

This class of problem is picked up by JSHint, which is available as a standard syntax check in my favoured web editor, Komodo Edit ; have taken liberty of patching away all it's complaints about

  • Semicolons
  • Commas
  • Comparison operators

.. attached to issue.

Have not done anything about other warnings ; the one that concerned me most was the warning about a fall-through in a case statement, but without a comment to the contrary and no familiarity with the code, cannot be sure this is not intentional.


journals

--------------------------------------------------------------------------------
Committed in trunk and 2.3-stable, thanks.
--------------------------------------------------------------------------------


related_issues

relates,Closed,10286,Auto-populate fields while creating a new user with LDAP

Admin Redmine さんが約4年前に更新

  • カテゴリUI_10 にセット
  • 対象バージョン2.3.1_71 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0