[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search

CLDR Ticket #10396(closed: fixed)

Opened 20 months ago

Last modified 4 months ago

ST: on Edge or IE copy "English" or "Winning" doesn't work

Reported by: kristi Owned by: tbishop
Component: surveytool-other Data Locale:
Phase: dsub Review: srl
Weeks: Data Xpath:


Using Edge or IE click on + and then "English" or "Winning"

Actual: the page refreshes and goes back to Locale selection (first entry point).
You are no longer on the page you were working on.


Change History

comment:1 Changed 20 months ago by kristi

  • Owner changed from anybody to kristi
  • Status changed from new to design

comment:2 Changed 20 months ago by kristi

  • Component changed from unknown to survey
  • Milestone changed from UNSCH to 33

comment:3 Changed 15 months ago by kristi

  • Owner changed from kristi to frontend

comment:4 Changed 12 months ago by mark

  • Milestone changed from 33 to 34

comment:5 Changed 12 months ago by kristi

  • Keywords BrowerCompat added

comment:6 Changed 10 months ago by tbishop

This is the first ticket referenced under Priorities for UI Improvement Goals at:


TRAC keyword “BrowserCompat” - The following 4 browsers need to be supported: Chrome, Firefox, Safari, Edge - Updated browsers (no older than 6 months)

Testing on localhost I've reproduced both the incorrect behavior using Edge, and the correct behavior on Firefox, Chrome, and Safari. I propose to make a branch cldr/branches/tbishop/t10396 for this ticket. A solution might involve some or all of the following: further study and testing; updating Dojo to a newer version; revising legacy usages of Dojo; using Asynchronous Module Definition (AMD) where appropriate; addressing warnings such as "XMLHttpRequest with the synchronous flag set to true is deprecated" and errors reported by validator.w3.org such as "Attribute execute not allowed on element div at this point" and "Duplicate ID stchanged_btn".

comment:7 Changed 10 months ago by tbishop

Here's a report on some of what I've learned so far about JavaScript libraries/frameworks used by CLDR and their possible relation to the Edge incompatibility bug.


This folder contains Dojo 1.7.2:


It seems mostly unused for anything related to this bug; at least its dojo.js function is unused. Some parts may be used elsewhere such as "js/dojo/dojox/widget/Standby/Standby.css" in cldr/tools/SurveyConsole/WebContent/index.html. Removing the folder doesn't seem to make any difference I've noticed, though.

This file links to Dojo 1.5 on ajax.googleapis.com:


These files link to Dojo 1.10.4 on ajax.googleapis.com:


Removing WebContent/js/dojo, and changing 1.5 and 1.10.4 to 1.13.0 (the latest version other than 2.x) appears to cause no change: ST still works on Firefox and fails on Edge. Still, linking to three different Dojo versions, and hard-coding the version number in multiple places, isn't optimal. I propose to encapsulate the dependency by specifying the Dojo version and options in one place only, namely dojoheader.jspf, which can be included by about.jsp, browse.jsp, and ajax_status.jsp.

Using the Edge debugging tools, including the profiler, there are clues suggesting that Dojo may be involved in causing an unwanted reload that goes back to the locale selection stage. However, the clues are hard to read since Dojo is minified. I plan to install the human-legible source for Dojo 1.13.0. That should make it clearer what's going on with Dojo when the bug occurs. There might be a bug in Dojo related to Edge compatibility. Or, we may need to revise our usage of Dojo to follow recommended current practices, such as AMD, async true. Even if the bug turns out not to be related to Dojo, modernizing is needed in the long run. Possibly related is this warning: "Use of XMLHttpRequest with the synchronous flag set to true is deprecated due to its impact on user-perceived site performance." I'm not sure what relation there is, if any, between async as in AMD, and async as in ajax. In the long run, we should get away from deprecated and legacy usages.

jQuery and jQuery UI

These files link to jQuery 1.11.0 (latest version of jQuery is 3.3.1):


Updating jQuery to 3.3.1 appears to cause no change: ST still works on Firefox and fails on Edge.

This file links to jQuery UI 1.10.4 (latest version of jQuery UI is 1.12.1):


Updating jQuery UI to 1.12.1 results in "ERROR: multipleDefine" in Edge console. The order in which Dojo and jQuery UI are loaded is important, and there are recommended ways to combine them as dependencies. I don't see evidence that jQuery UI is involved in the bug; still I'd like to enable updating to the latest jQuery UI, and to clarify what it's used for in ST.


These files link to jquery.autosize.min.js:


The file jquery.autosize.min.js itself is here:


It appears only to be called here, with "postModal.find('textarea').autosize()":


In my testing for the "English" bug on Firefox and Edge, autosize is never called. I doubt it's related to the bug.


cldr tools/cldr-apps/WebContent/js/bootstrap.min.js

Bootstrap 3.1.1 appears to play crucial role in the style and layout of ST. I don't see any evidence that Bootstrap is involved in the bug. Still, updating to the latest version 4.1.0 (see http://getbootstrap.com) may be worth trying at some point.

I've been manually testing the graphical interface in the browser. For test-driven development of the frontend, ideally we should have automated tests with full coverage. The cross-platform WebDriver API is made for this purpose, and seems worth looking into, though I'm not planning on setting it up for testing the current bug.

I'm hoping the non-minified Dojo function names, and the ability to step through the Dojo code, will show where the bug is and how to solve it. I plan to create a branch cldr/branches/tbishop/t10396 today and start checking in changes involving dojoheader.jspf and dojo-release-1.13.0-src.

Version 0, edited 10 months ago by tbishop (next)

comment:8 Changed 10 months ago by tbishop

The bug can evidently be fixed by changing submit to button in these two lines in survey.js:

copyWinning.type = "submit";

copyEnglish.type = "submit";

The type attribute of the button element can have the values button|submit|reset. A submit button submits form-data. With Edge, submit causes a page reload which isn't appropriate for these buttons.

comment:9 Changed 10 months ago by tbishop

  • Review set to kristi

comment:10 Changed 10 months ago by tbishop

I've checked the changes (only the two lines in survey.js) into trunk, and tested on SmokeTest with Firefox on macOS and Edge on Windows 10. It all looks OK to me.

comment:11 Changed 10 months ago by tbishop

  • Keywords BrowserCompat added; BrowerCompat removed

comment:12 Changed 10 months ago by tbishop

  • Owner changed from frontend to tbishop
  • Status changed from design to accepted

comment:13 Changed 10 months ago by tbishop

  • Status changed from accepted to reviewing

comment:14 Changed 10 months ago by kristi

  • Review changed from kristi to mark

Test the functionality from the UI side and it works great!
Mark or Steven, could you please do the code review?

comment:15 Changed 5 months ago by mark

  • Review changed from mark to srl

Resetting to srl, since he is better at JS.

comment:16 Changed 4 months ago by srl

  • Status changed from reviewing to closed
  • Resolution set to fixed

Add a comment

Modify Ticket

as closed
Next status will be 'new'
Next status will be 'closed'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.