InputEventNotificationBus.OnReleased Event consumed when clicking on a button

I am attempting to activate a button by clicking and dragging through it. In order to do so, I plan to connect the button to an InputEventNotificationBus that sets a boolean to true when the mouse is held down, and sets it to false when it is released.

Or rather, those were my initial thoughts. It appears that the TestEvent that I have set up isn’t getting released when I stop holding the mouse button, making the event continuously fire. This occurs only when I click a button. Clicking in a space without a button returns it to normal. This is all in the UI space, if that matters.

My questions:

  • Was InputEventNotificationBus intended for UI use? If not, what should I use in its place?
  • Is this a bug? If not, what am I doing wrong?
    I don’t have an actual UI to give you, but here is the code I am using to test the event functionality. Notice that the testValue continues to display whatever event value multiplier that is set once a button is clicked:
	local uitestclass = {
Properties = {},
testValue = 0.0 }
function uitestclass:OnActivate()
Debug.Log("Test Class Active")
local testEventID = InputEventNotificationId("TestEvent")
self.testEventConnection = InputEventNotificationBus.Connect(self, testEventID)
self.tickConnection = TickBus.Connect(self, 0)
function uitestclass:OnTick(delta, timePoint)
Debug.Log("Test Value: " .. self.testValue)
function uitestclass:OnHeld(value)
Debug.Log("TestEvent Held")
self.testValue = value
function uitestclass:OnPressed(value)
Debug.Log("TestEvent Pressed")
self.testValue = value
function uitestclass:OnReleased(value)
Debug.Log("TestEvent Released")
self.testValue = value
function uitestclass:OnDeactivate()
return uitestclass

For the inputbindings file I had a single event and generator TestEvent with the following data:

  • Input Device Type: mouse
  • Input Name: mouse_button_left
  • Event Value multiplier: 0.5
  • Dead Zone: 0.2
    Any help is greatly appreciated!