fix: POS Item Cart non-stop scroll issue (#26692)
This commit is contained in:
parent
58118d7830
commit
3b7615750a
@ -564,7 +564,6 @@ erpnext.PointOfSale.ItemCart = class {
|
||||
)
|
||||
|
||||
set_dynamic_rate_header_width();
|
||||
this.scroll_to_item($item_to_update);
|
||||
|
||||
function set_dynamic_rate_header_width() {
|
||||
const rate_cols = Array.from(me.$cart_items_wrapper.find(".item-rate-amount"));
|
||||
@ -639,12 +638,6 @@ erpnext.PointOfSale.ItemCart = class {
|
||||
$($img).parent().replaceWith(`<div class="item-image item-abbr">${item_abbr}</div>`);
|
||||
}
|
||||
|
||||
scroll_to_item($item) {
|
||||
if ($item.length === 0) return;
|
||||
const scrollTop = $item.offset().top - this.$cart_items_wrapper.offset().top + this.$cart_items_wrapper.scrollTop();
|
||||
this.$cart_items_wrapper.animate({ scrollTop });
|
||||
}
|
||||
|
||||
update_selector_value_in_cart_item(selector, value, item) {
|
||||
const $item_to_update = this.get_cart_item(item);
|
||||
$item_to_update.attr(`data-${selector}`, escape(value));
|
||||
|
Loading…
x
Reference in New Issue
Block a user