Opened 7 years ago
Closed 7 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",...)
indojo/on.js
which creates temporary element withposition: 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 ofdojo/on.js
something like:element.style.top = '0px'; element.style.left = '0px';
Change History (2)
comment:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
Component: | General → Events |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Duplicate of #17626.
OK, closing it, thanks for tracking down what's causing the problem.
Sorry, duplicate of #17626, close please.