From a16508fb1c2befb7c2f700d88bf8b1c7aaa6d9d1 Mon Sep 17 00:00:00 2001 From: Jesse Date: Mon, 1 Apr 2019 14:01:44 -0400 Subject: [PATCH] remove custom a11y listener now that ButtonListener is instrumented, see #487 --- js/Checkbox.js | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/js/Checkbox.js b/js/Checkbox.js index 9b98b2e6..b130af09 100644 --- a/js/Checkbox.js +++ b/js/Checkbox.js @@ -128,24 +128,16 @@ define( function( require ) { content.pickable = false; // since there's a pickable rectangle on top of content // interactivity - var fire = function() { - if ( self.enabledProperty.value ) { - var newValue = !property.value; - toggledEmitter.emit( newValue ); - } - }; - var checkboxButtonListener = new ButtonListener( { - fire: fire + fire: function() { + if ( self.enabledProperty.value ) { + var newValue = !property.value; + toggledEmitter.emit( newValue ); + } + } } ); this.addInputListener( checkboxButtonListener ); - // a11y - fire the listener when checkbox is clicked with keyboard or assistive technology - var changeListener = { - change: fire - }; - this.addInputListener( changeListener ); - // sync with property var checkboxCheckedListener = function( checked ) { self.checkedNode.visible = checked;