Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/MakeDropdownTextDoubleClickable #153

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

TwistedClone
Copy link
Contributor

Related to: https://github.com/boxture/server/issues/3272

Topbar dropdown is clickable wherever and double click selectable.
Page (table) dropdowns are now double clickable and this will select the entirety of the text the selection of specific place/drag selecting is blocked by the drag function on the dropdowns themselves, however changing cursor position can be done with arrows

@@ -12,7 +12,7 @@ div.satis-dropdown data-action="keydown->satis-dropdown#dispatch" data-controlle
.h-12.p-1.flex.rounded
.flex.flex-auto.flex-wrap
/ Input where you can search
input.p-1.px-2.appearance-none.outline-none.w-full.sts-dropdown-input.text-gray-800.dark:text-gray-300 data-action="input->satis-dropdown#search" data-satis-dropdown-target="searchInput" placeholder=placeholder autofocus=options[:autofocus]
input.text.p-1.px-2.appearance-none.outline-none.w-full.sts-dropdown-input.text-gray-800.dark:text-gray-300 data-action="input->satis-dropdown#search" data-satis-dropdown-target="searchInput" placeholder=placeholder autofocus=options[:autofocus] ondblclick="this.select()"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to work with stimulus events (dblclick) and then trigger the select of the input. Don't put normal JS directly in html.

https://onrails.blog/2018/04/11/lets-make-an-editable-header-using-stimulus-js/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants