Commit 3c046cc4 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge pull request #7426 from Razer6/rtrim_note_input

rtrim() input before checking if note form is empty
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment