Skip to content

Commit 3e48b0e

Browse files
committedNov 19, 2015
Auto merge of #29917 - shssoichiro:doc-sidebar-order, r=alexcrichton
A race condition in Javascript was causing unpredictable ordering of the sidebar boxes when loading documentation generated by rustdoc, due to the script that adds the Crates box being executed asynchronously. Disabling the asynchronous execution and deferring this script should ensure that the Crates box always appears last in the sidebox (this seemed to be the more common ordering prior to this change). Fixes #29698
2 parents 9303055 + 51c35db commit 3e48b0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/librustdoc/html/layout.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ r##"<!DOCTYPE html>
137137
<script src="{root_path}jquery.js"></script>
138138
<script src="{root_path}main.js"></script>
139139
{play_js}
140-
<script async src="{root_path}search-index.js"></script>
140+
<script defer src="{root_path}search-index.js"></script>
141141
</body>
142142
</html>"##,
143143
content = *t,

0 commit comments

Comments
 (0)
Please sign in to comment.