@vaadin/grid
Advanced tools
Comparing version 23.0.2 to 23.0.3
{ | ||
"name": "@vaadin/grid", | ||
"version": "23.0.2", | ||
"version": "23.0.3", | ||
"publishConfig": { | ||
@@ -44,12 +44,12 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/checkbox": "^23.0.2", | ||
"@vaadin/component-base": "^23.0.2", | ||
"@vaadin/text-field": "^23.0.2", | ||
"@vaadin/vaadin-lumo-styles": "^23.0.2", | ||
"@vaadin/vaadin-material-styles": "^23.0.2", | ||
"@vaadin/vaadin-themable-mixin": "^23.0.2" | ||
"@vaadin/checkbox": "^23.0.3", | ||
"@vaadin/component-base": "^23.0.3", | ||
"@vaadin/text-field": "^23.0.3", | ||
"@vaadin/vaadin-lumo-styles": "^23.0.3", | ||
"@vaadin/vaadin-material-styles": "^23.0.3", | ||
"@vaadin/vaadin-themable-mixin": "^23.0.3" | ||
}, | ||
"devDependencies": { | ||
"@esm-bundle/chai": "^4.3.4", | ||
"@vaadin/polymer-legacy-adapter": "^23.0.2", | ||
"@vaadin/polymer-legacy-adapter": "^23.0.3", | ||
"@vaadin/testing-helpers": "^0.3.2", | ||
@@ -59,3 +59,3 @@ "lit": "^2.0.0", | ||
}, | ||
"gitHead": "a50f708dc0fe7d0cc10763f413838d71b1a0788b" | ||
"gitHead": "3f010a4167c9e04405c9dfab098da0821e02a601" | ||
} |
@@ -60,3 +60,3 @@ /** | ||
if (targetCell.offsetWidth) { | ||
const style = window.getComputedStyle(targetCell); | ||
const style = getComputedStyle(targetCell._content); | ||
const minWidth = | ||
@@ -63,0 +63,0 @@ 10 + |
@@ -10,3 +10,3 @@ /** | ||
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js'; | ||
import { isAndroid, isFirefox, isIOS, isSafari, isTouch } from '@vaadin/component-base/src/browser-utils.js'; | ||
import { isAndroid, isChrome, isFirefox, isIOS, isSafari, isTouch } from '@vaadin/component-base/src/browser-utils.js'; | ||
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js'; | ||
@@ -689,9 +689,12 @@ import { TabindexMixin } from '@vaadin/component-base/src/tabindex-mixin.js'; | ||
cellContent.addEventListener('mousedown', () => { | ||
if (window.chrome) { | ||
if (isChrome) { | ||
// Chrome bug: focusing before mouseup prevents text selection, see http://crbug.com/771903 | ||
const mouseUpListener = () => { | ||
if (!cellContent.contains(this.getRootNode().activeElement)) { | ||
const mouseUpListener = (event) => { | ||
// If focus is on element within the cell content — respect it, do not change | ||
const contentContainsFocusedElement = cellContent.contains(this.getRootNode().activeElement); | ||
// Only focus if mouse is released on cell content itself | ||
const mouseUpWithinCell = cellContent.contains(event.target); | ||
if (!contentContainsFocusedElement && mouseUpWithinCell) { | ||
cell.focus(); | ||
} | ||
// If focus is in the cell content — respect it, do not change. | ||
document.removeEventListener('mouseup', mouseUpListener, true); | ||
@@ -698,0 +701,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
330865
9001