Commit 7c03478198da78882f7b34488974ee5f7bc48159
Committed by
Antonio Terceiro
1 parent
7499fae9
Exists in
master
and in
29 other branches
Fixing bug in onResize body event
(ActionItem1753)
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/views/layouts/application.rhtml
... | ... | @@ -42,7 +42,7 @@ |
42 | 42 | onresize="registerDocumentSize()"> |
43 | 43 | <script type="text/javascript"> |
44 | 44 | function registerDocumentSize() { |
45 | - document.body.className = document.body.className.replace(/(^| )docSize.+( |$)/g, " "); | |
45 | + document.body.className = document.body.className.replace(/docSize-(G|L)T-\d+/g, ""); | |
46 | 46 | for ( var x=100; x<=1500; x+=100 ) { |
47 | 47 | if ( document.body.clientWidth > x ) { |
48 | 48 | document.body.className += " docSize-GT-" + x; | ... | ... |