qooxdoo icon indicating copy to clipboard operation
qooxdoo copied to clipboard

Possible problem with "hovered" state and MenuButton.js

Open lucapivato opened this issue 4 years ago • 2 comments

I'm not sure why _onPointerOver() and _onPointerOut() were overridden in MenuButton while _onPointerDown/Up() call the base. It appears that when pressing a MenuButton, moving the pointer out and releasing it leaves it stuck with the "hovered" state because it gets "pointerover" while the pointer is captured but the overridden _onPointerOver() doesn't check.

https://tinyurl.com/y63poo24

Press while on, move out and release. If the theme changes some style while "hovered" it will get stuck for the menu button.

Question is, anyone see any downside to simply removing the override? There must have been a reason when it was overridden.

// overridden
_onPointerOver : function(e) {
  // Add hovered state
  this.addState("hovered");
},


// overridden
_onPointerOut : function(e) {
  // Just remove the hover state
  this.removeState("hovered");
},

lucapivato avatar Nov 26 '20 15:11 lucapivato

the origin of the change is this patch here https://github.com/qooxdoo/qooxdoo/commit/9a88c057d536c8e3e8a6b075a1f88e001d4ff954 "blame" is our friend

oetiker avatar Nov 27 '20 07:11 oetiker

I agree the behavior does not seem intentional :)

oetiker avatar Nov 27 '20 07:11 oetiker