Avoid Element.closest() for IE 9 compatibility

Fixes #37234.
This commit is contained in:
George Claghorn 2019-09-29 09:07:11 -04:00
parent 53a1e44a55
commit 8f37e2555a
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ Rails.serializeElement = (element, additionalParam) ->
inputs.forEach (input) ->
return if !input.name || input.disabled
return if input.closest('fieldset[disabled]')
return if matches(input, 'fieldset[disabled] *')
if matches(input, 'select')
toArray(input.options).forEach (option) ->
params.push(name: input.name, value: option.value) if option.selected