wenzhixin / bootstrap-table

An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation, Vue.js)
https://bootstrap-table.com/
MIT License
11.74k stars 4.44k forks source link

Bootstrap table filter ,updateCellByUniqueId , set focus issue on tab key #6708

Open JetalS opened 1 year ago

JetalS commented 1 year ago

Description

I am using a bootstrap table filter. I have used the input box using the data-formatter function to update the value of the cell. On change of inputbox value I am updating cell value using "updateCellByUniqueId". The issue is when I change value and hit tab key the focus is set to the filter control - even though I have added jquery code to set focus on the same input.

Here is JSFiddle (https://jsfiddle.net/Jetal15/bLvcg3p4/19/)

Follow below steps for this scenario:

  1. Filter on department say - Deparment-1
  2. Change input box value and press tab key focus goes to Department dropdown - rather than input box

How to fix this ?

Example(s)

No response

wenzhixin commented 1 year ago

Please provide an Online Example to show your problem. Thanks!

JetalS commented 1 year ago

Here is the example https://live.bootstrap-table.com/code/JetalS/14854

JetalS commented 1 year ago

Looked UpdateCellByUniqueId - it calls function "_updateCellOnly". This function has code - "this.resetView();" - I think this sets focus on filter control. It can modify by passing true/false parameter to "_updateCellOnly" function to call "this.resetView();" or not.

UtechtDustin commented 1 year ago

@djhvscf could maybe an issue with the new cache you added ?

mattsayerstdx commented 2 months ago

Has there been any movement on this issue at all? It is consistently reproducible. It seems like these two issues are very likely related:

I can confirm that the "quickfix" workaround here does provide a path forward if you are using any manually configured filters controls (or a custom text search control). https://github.com/wenzhixin/bootstrap-table/issues/6326#issuecomment-1380197688