Math.trunc() not work in IE
Internet Explorer not support Math.trunc() function. Because of this, changing fields does not work in IE. Instead of a function Math.trunc(), you can use the Math.floor() https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc
This commit is contained in:
parent
e968ee7499
commit
5be575a324
@ -213,7 +213,7 @@ class DetailsIssueHooks < Redmine::Hook::ViewListener
|
||||
o << "<script>"
|
||||
o << "//<![CDATA[\n"
|
||||
o << " function resizeTitleInput() {\n"
|
||||
o << " $('#TitleInput input')[0].size = Math.max(50, Math.trunc(window.innerWidth / 11));\n"
|
||||
o << " $('#TitleInput input')[0].size = Math.max(50, Math.floor(window.innerWidth / 11));\n"
|
||||
o << " }\n"
|
||||
o << " resizeTitleInput();\n"
|
||||
o << " window.addEventListener('resize', resizeTitleInput);\n"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user