jarek-foksa / xel

Xel - Widget toolkit for building native-like Electron and Web apps
https://xel-toolkit.org
Other
679 stars 58 forks source link

Can't use spacebar on input fields inside popover in button elements. #74

Closed haroldiedema closed 6 years ago

haroldiedema commented 6 years ago

Hi,

image

I'm using <x-button> with an <x-popover> element as shown in the image above. However, the button seems to be staying in "focus", resulting in users being unable to use the spacebar in input elements. Hitting spacebar "clicks" the button instead. (click event is triggered, but the popover does not disappear).

Do you have any idea how to fix this?

I've tried firing the 'blur' event on the button, but this doesn't work either.

Thanks in advance!

edit: The template follows this structure:

<x-button>
    <x-label>Select voxel</x-label>
    <x-popover style="--align: bottom">
        <main>
            <input type="text" value="cantusespacebarhere">
        </main>
    </x-popover>
</x-button>
jarek-foksa commented 6 years ago

This issue should be fixed in Xel version 0.0.141.

haroldiedema commented 6 years ago

Oh wow, that was quick! I'll give it a try when I get home from the office tonight.

Thanks a lot!