eww icon indicating copy to clipboard operation
eww copied to clipboard

[BUG] Pressing enter on a focused button does not trigger an onclick event

Open AlecsFerra opened this issue 3 years ago • 10 comments

Checklist before submitting an issue

  • [X] I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
  • [X] I have specifically verified that this bug is not a common user error
  • [X] I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)

Description of the bug

Title

Reproducing the issue

(defvar eww "eww -c $HOME/.config/eww/bat")

(defwindow batmenu
  :windowtype "normal"
  :stacking   "fg"
  :geometry
    (geometry
      :y      "30%"
      :width  "40%"
      :height "40%"
      :anchor "center top")
  (mainbox))

(defwidget mainbox []
  (eventbox
    :onhoverlost "${eww} close batmenu"
    (box
      :orientation  "h" 
      :space-evenly true
      (input
        :value "a"
        :onchange "notify-send {}")
      (button
        :onclick "notify-send A"
        "A")
      (button
        :onclick "notify-send B"
        "B"))))

Focus one of the button by tabbing and press enter

Expected behaviour

No response

Additional context

No response

AlecsFerra avatar Aug 12 '22 08:08 AlecsFerra

Tell me if you want a PR: https://github.com/AlecsFerra/eww/commit/b001d005f3f3c5706a5903f337020976ad6016e4

AlecsFerra avatar Aug 12 '22 08:08 AlecsFerra

I think this is a good idea

Magnitudexx avatar Sep 16 '22 08:09 Magnitudexx

@elkowar what do you think?

Magnitudexx avatar Sep 28 '22 08:09 Magnitudexx

@elkowar what do you think?

I'm waiting for him lol

AlecsFerra avatar Oct 03 '22 11:10 AlecsFerra

try adding focusable, there was something about keyboard support with it

sqrvrt avatar May 12 '23 15:05 sqrvrt

Lovely, works perfectly after compiling these changes with aur/eww-wayland 0.4.0-1 (+8 1.52). Thank you @AlecsFerra . Hope this gets added soon!

ModestTom avatar May 18 '23 12:05 ModestTom

I think it won't happen since now the patch cannot't be automatically applied and the pr was made like 1 year ago.

AlecsFerra avatar May 22 '23 13:05 AlecsFerra

@AlecsFerra That's unfortunate. I was able to add the changes manually and will continue to use it. Hopefully @elkowar will consider it at some point. Priorities and such

ModestTom avatar May 25 '23 15:05 ModestTom

@AlecsFerra That's unfortunate. I was able to add the changes manually and will continue to use it. Hopefully @elkowar will consider it at some point. Priorities and such

If you want to share it by opening a PR with the changes on my repo if this feature will be considered we could just merge it directly to upstream.

AlecsFerra avatar May 25 '23 15:05 AlecsFerra