Sfoglia il codice sorgente

fix: fn `make-confirm-modal` not respond to enter key-down

situ2001 3 anni fa
parent
commit
e7188a643e
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      src/main/frontend/ui.cljs

+ 3 - 1
src/main/frontend/ui.cljs

@@ -640,7 +640,9 @@
        [:div.mt-5.sm:mt-4.sm:flex.sm:flex-row-reverse
         [:span.flex.w-full.rounded-md.shadow-sm.sm:ml-3.sm:w-auto
          [:button.inline-flex.justify-center.w-full.rounded-md.border.border-transparent.px-4.py-2.bg-indigo-600.text-base.leading-6.font-medium.text-white.shadow-sm.hover:bg-indigo-500.focus:outline-none.focus:border-indigo-700.focus:shadow-outline-indigo.transition.ease-in-out.duration-150.sm:text-sm.sm:leading-5
-          {:type     "button"
+          {:type     "button" 
+           :autoFocus "on"
+           :class "ui__modal-enter"
            :on-click #(and (fn? on-confirm)
                            (on-confirm % {:close-fn close-fn
                                           :sub-selected (and *sub-checkbox-selected @*sub-checkbox-selected)}))}