Merge pull request #4468 from expsa/eltayar

add_focus_enhance
This commit is contained in:
Mohamed Eltayar 2025-08-31 17:07:08 +03:00 committed by GitHub
commit b4641991c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -161,6 +161,16 @@ odoo.define('fims_general_search_tree_view.list_search', function (require) {
limit: state.limit || 80
}).then(function() {
return self.update({}, {reload: false});
}).then(function() {
// ✅ الإضافة البسيطة الوحيدة: إعادة Focus بعد الـ reload
setTimeout(function() {
if (self.renderer && self.renderer.$) {
var $input = self.renderer.$('.oe_search_input');
if ($input.length) {
$input.focus();
}
}
}, 100); // تأخير بسيط للتأكد من اكتمال الـ rendering
}).finally(function() {
if (self.renderer) {
self.renderer.$('.oe_search_loading').hide();