Sha256: 87496c40af832384ff2499726523e2fab002264da84f8ba6ab2f4af5b2df333b

Contents?: true

Size: 371 Bytes

Versions: 8

Compression:

Stored size: 371 Bytes

Contents

import { Controller } from "stimulus"

export default class extends Controller {
  static targets = [ "shadowField" ]

  clickShadowField(event) {
    // we have to stop safari from doing what we originally expected.
    event.preventDefault();

    // then we need to manually click the hidden checkbox or radio button ourselves.
    this.shadowFieldTarget.click()
  }
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bullet_train-fields-1.0.7 app/javascript/controllers/fields/button_toggle_controller.js
bullet_train-fields-1.0.6 app/javascript/controllers/fields/button_toggle_controller.js
bullet_train-fields-1.0.5 app/javascript/controllers/fields/button_toggle_controller.js
bullet_train-fields-1.0.4 app/javascript/controllers/fields/button_toggle_controller.js
bullet_train-fields-1.0.3 app/javascript/controllers/fields/button_toggle_controller.js
bullet_train-fields-1.0.2 app/javascript/controllers/fields/button_toggle_controller.js
bullet_train-fields-1.0.1 app/javascript/controllers/fields/button_toggle_controller.js
bullet_train-fields-1.0.0 app/javascript/controllers/fields/button_toggle_controller.js