Opened 5 years ago

Closed 5 years ago

#17645 closed defect (duplicate)

dojo.on causes Chrome to jump to the end of page in some cases

Reported by: rtasarz Owned by:
Priority: undecided Milestone: tbd
Component: Events Version: 1.9.2
Keywords: Cc:
Blocked By: Blocking:

Description

Hi,

How to reproduce:

Page with body section much longer than viewport and script declaration as given below. Probably due to asynchronous loading, effect may be observable or not depending on computer speed and body structure parsing time.

 <script type="text/javascript" src="/_js/dojo/dojo.js" 
    data-dojo-config="deps: ['dojo/parser'], async: true,
    isDebug: true, parseOnLoad: true"></script>

Expected behaviour:

No visible changes in comparison to the page withous script included.

Observed behaviour:

Page sometimes jumps to the end or near the end depending on parsing time and pictures loading times.

Solution:

I've discovered this issue after upgrading to 1.9.2. Investigating it lead me to new implementation of has.add("event-focusin",...) in dojo/on.js which creates temporary element with position: fixed style, then focuses on it. Unfortunately Chrome (tested v31 to v33) ignores its positioning when no coordinates are provided, effectively leaving it at the bottom of page. Simple fix is adding in line 20 of dojo/on.js something like:

  element.style.top = '0px';
  element.style.left = '0px';

Change History (2)

comment:1 Changed 5 years ago by rtasarz

Sorry, duplicate of #17626, close please.

comment:2 Changed 5 years ago by bill

Component: GeneralEvents
Resolution: duplicate
Status: newclosed

Duplicate of #17626.
OK, closing it, thanks for tracking down what's causing the problem.

Note: See TracTickets for help on using tickets.