LoginSignup
0
0

More than 1 year has passed since last update.

【jQuery UI】sortable() の handle オプションにinputタグを指定した際に動作しない事象の解決法

Last updated at Posted at 2023-03-31

結論

sortable()cancelオプションにinputbuttonタグが指定されており、初期設定で動作しないようになっている。
その為、以下のような記述が必要。

$("hoge").sortable({ 
    handle: 'button',
    cancel: '' // 空文字を指定
})

参考

cancel
型:Selector 初期値:":input,button"
マッチした要素の並び替え処理が開始されることをキャンセルします。

handleオプションよりcancelオプションの指定の方が優先される模様。
単純だがかなりハマってしまったので備忘録として。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0