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

CLDR Ticket #11265(closed: fixed)

Opened 4 months ago

Last modified 5 weeks ago

ST: refreshes randomly when adding new suggestions

Reported by: kristi Owned by: tbishop
Component: survey-backend Data Locale:
Phase: dsub Review: mark
Weeks: Data Xpath:
Xref:

Description (last modified by kristi) (diff)

Try adding new suggestions for the Day names. At random the page refreshes and goes to the top of the page and I lose my place.

Sometime, it refreshes after 3 entries of new suggestion.
sometimes, it refreshes after 1 entry or while trying to add one.
Inside the edit box to add a new suggestion, use the Delete key to delete the last character will consistently refresh
Not consistently, but the Backspace key to delete the last character in the edit box will also refresh and take you to the next page in the survey tool (E.g. Gregorian to Generic under date and time)

Browsers:

  1. I'm using Edge with the above info.
  2. Firefox does not have this issue.
  3. Chrome may happen but not often (I'm not clear on the experience)

Attachments

Change History

comment:1 Changed 4 months ago by kristi

  • Description modified (diff)

comment:2 Changed 4 months ago by kristi

  • Description modified (diff)

comment:3 Changed 4 months ago by kristi

  • Description modified (diff)

comment:4 Changed 4 months ago by kristi

  • Description modified (diff)

comment:5 Changed 4 months ago by mark

  • Owner changed from anybody to tbishop
  • Priority changed from assess to major
  • type changed from unknown to survey
  • Status changed from new to accepted
  • Milestone changed from UNSCH to 34

Might be duplicate of ticket:11218

comment:6 Changed 7 weeks ago by tbishop

This partially a duplicate of ticket 11218, about backspace and arrow keys.

The other part involves refresh, which I also noticed while working on 11211. If you quickly vote for existing candidate items in a few rows, then click the Add button in another row and start typing, the little input window may disappear when the server response is received concerning the earlier votes. This appears to be due to table elements being replaced in the DOM. Each time a data update is received from the server, the entire table gets regenerated in the DOM. The little input window is a child element of the Add button in one of the rows, and disappears when the table gets regenerated.

Possible solutions:

  1. only update the row in which the vote or abstention has occurred; or update all the rows except the one that has the input window
  2. recreate the little input window if appropriate when updating its row
  3. postpone all updates while the little input window is open
  4. make the little input window always present and not a child of the row; show it and fix its contents but just move its location to the rows location

The first solution might be best in terms of efficiency and responsiveness. The main drawback would be when a vote in one row changes what should be displayed in another row, as when one row inherits from another row in the same locale. Also it involves rewriting a large amount of code, since currently the whole table always gets regenerated, and we'd need to keep the existing elements and update them in place instead.

The second solution, removing then restoring the little window, when the user may be in the middle of typing, risks loss of keystrokes.

The third solution, postponement, might be best in terms of minimizing disruption for the user, though the other rows might then take a very long time to get updated. The user would be dependent on the other rows being visibly marked as out-of-sync, until the little input window is closed.

The fourth solution was suggested by Steven by email. It has advantages, including: robustness, whether or not the whole table gets regenerated; no risk of losing keystrokes; no delay needed for updating rows. I've made some effort to implement it but so far have run into problems. The little window is a bootstrap "popover", and while there are methods to attach it to a parent outside the table while still positioning it relative to an element inside the table, I haven't succeeded with the repositioning, maybe because we're using bootstrap 3.1.1, while the current version is 4.1.3. Updating to 4.1.3 is non-trivial due to dependencies on jquery (we're using jquery 1.11.0, current is 3.3.1) and dojo (we're using Dojo Toolkit 1.10.4, current is Dojo Toolkit 1.14 or Dojo 3.0). I'll try more, and if unsuccessful might try the third solution instead at least temporarily.

comment:7 Changed 7 weeks ago by tbishop

  • Component changed from unknown to survey
  • Milestone changed from 34 to 35

comment:8 Changed 6 weeks ago by tbishop

I've found a simple fix that corresponds to the "third solution" mentioned above: the function isInputBusy in survey.js currently returns true only

    if (sel.anchorNode.className.indexOf("dijitInp")!=-1)


But I find with the little input window open, in fact the className is "popover-content". If I add this alternative condition to return true,

    if (sel.anchorNode.className.indexOf("popover-content")!=-1)

Then the little input window doesn't disappear.

comment:9 Changed 5 weeks ago by tbishop

I've committed the change to trunk as changeset [14530], and tested on SmokeTest. Looks good, the little input window doesn't disappear.

Last edited 5 weeks ago by tbishop (previous) (diff)

comment:10 Changed 5 weeks ago by tbishop

  • Status changed from accepted to reviewing
  • Review set to mark

comment:11 Changed 5 weeks ago by mark

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

Add a comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.