ponkotsu-md-editor 0.2.37 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fc85c453bbae9a24b6650133e33bca26d1ec9b030380e6a1aca7f9aeeade15a
4
- data.tar.gz: db217162995018236d1dad008c61fc6f9e377c3d7d5727d309f24f9184e8d530
3
+ metadata.gz: 2b5d9c48a261404a86755c2f7ddb86107ad4eb4542ff32b168b840e30e487b6f
4
+ data.tar.gz: 1c52ab405ad31d840defe057c86b4d5e4fb51de0d6e7c720577e7de44d1a5f75
5
5
  SHA512:
6
- metadata.gz: b8e9dbb0d77c58d30170935b7d0c09434d620473dd74d4307bcbe814a46ceabfb52a76232b651430a9c37348641026ac8cdf674375f79fffd627c696e210b582
7
- data.tar.gz: 2298cf2348fdcd08e64def9928ccd4825681f7d3e686242b887210ed3f327dc24c2ada88326aa69973f46a27c9a030f3373dfb05c1407af9322abc015bd3523c
6
+ metadata.gz: 0dcc1603a4e7e39ec12559e796ba370b86b4d733e477090a862d3a7e64632cfc507fd9844ada34c0f966a812727a45fba5803ded816c9051a01c80cdd4ddd795
7
+ data.tar.gz: 9410db0726fde2dd9a395afe6a719e9e2aeab6c5a228322b600674bfd06e54bdac54d0d988d6b080270072857dc58d45340714852acea2a81596e404daf7e39d
@@ -151,10 +151,20 @@
151
151
  // 同期的に値を設定(確実性のため)
152
152
  hiddenField.value = (textarea.innerText || '').replaceAll('\u00A0', ' ');
153
153
 
154
+ // 送信ボタンのパラメーターを取得して追加
155
+ const submitter = e.submitter;
156
+ if (submitter && submitter.name && submitter.value) {
157
+ const input = document.createElement('input');
158
+ input.type = 'hidden';
159
+ input.name = submitter.name;
160
+ input.value = submitter.value;
161
+ form.appendChild(input);
162
+ }
163
+
154
164
  // 次のティックで送信
155
165
  setTimeout(() => {
156
166
  // console.log('Form submitting with content length:', hiddenField.value.length);
157
- form.requestSubmit();
167
+ form.submit();
158
168
  }, 0);
159
169
  });
160
170
  }
@@ -28,7 +28,8 @@ module PonkotsuMdEditor
28
28
  attribute = attribute[:attribute] if attribute.is_a?(Hash)
29
29
  content = content[:attribute] if content.is_a?(Hash)
30
30
  options = options[:options] if options.is_a?(Hash)
31
- render "ponkotsu_md_editor/editor", locals: { attribute: attribute, content: content, form: form, options: options }
31
+ render "ponkotsu_md_editor/editor",
32
+ locals: { attribute: attribute, content: content, form: form, options: options }
32
33
  end
33
34
  end
34
35
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PonkotsuMdEditor
4
- VERSION = "0.2.37"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ponkotsu-md-editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.37
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - dhq_boiler
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 8.0.2
18
+ version: '8.1'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 8.0.2
25
+ version: '8.1'
26
26
  description: There is a bug in Chrome where entering large amounts of text into a
27
27
  textarea element causes significant slowness (https://issues.chromium.org/issues/341564372).
28
28
  This gem serves as a countermeasure for that issue.
@@ -64,7 +64,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: 3.4.5
67
+ version: 3.4.7
68
68
  required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
70
  - - ">="