Skip to content
代码片段 群组 项目
提交 3c046cc4 编辑于 作者: Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
浏览文件

Merge pull request #7426 from Razer6/rtrim_note_input

rtrim() input before checking if note form is empty
No related branches found
No related tags found
无相关合并请求
......@@ -58,10 +58,10 @@ window.disableButtonIfEmptyField = (field_selector, button_selector) ->
field = $(field_selector)
closest_submit = field.closest("form").find(button_selector)
closest_submit.disable() if field.val() is ""
closest_submit.disable() if field.val().replace(/\s+$/, "") is ""
field.on "input", ->
if $(@).val() is ""
if $(@).val().replace(/\s+$/, "") is ""
closest_submit.disable()
else
closest_submit.enable()
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册