Opened 9 years ago
Closed 9 years ago
#15801 closed defect (invalid)
Dialog: problem in window.location.hash in onCancel method
Reported by: | rejukg | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Dijit | Version: | 1.2.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Hi I have a problem in Dialog component onCancel method. The scenario is whenever user closes the dojo dialog , user should be anchored or scrolled to a particular section of that page.
OnCancel:function(){ window.location.hash="sectionmarker"; }
The problem is the above code is moving the screen to the hashed section(section marker) which is fine , but then after immediately it is moving/scrolling the screen back to intial state.
Change History (3)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Ok guys,
I think I got it ..The solution is to disable the focus
autofocus:false, refocus:false,
comment:3 Changed 9 years ago by
Component: | General → Dijit |
---|---|
Description: | modified (diff) |
Resolution: | → invalid |
Status: | new → closed |
Summary: | Dojo dijit.Dialog | Problem in window.location.hash in onCancel method → Dialog: problem in window.location.hash in onCancel method |
Yes, it makes sense to set refocus:false if you want to send the focus somewhere else than the button that displayed the dialog.
But also, you probably should be waiting until the Dialog finishes hiding before doing anything, so you should be connecting to onHide not onCancel.
This is happening in IE7 & IE9