mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[dragging] Trim the css property value (#1989)
Webview2 on Windows returns a potential whitespace when defining the style like this `style="--wails-draggable: drag"`. Whereas Darwin already trims the value and returns "drag" and not " drag".
This commit is contained in:
@@ -87,7 +87,11 @@ window.addEventListener('mouseup', () => {
|
||||
});
|
||||
|
||||
let dragTest = function (e) {
|
||||
return window.getComputedStyle(e.target).getPropertyValue(window.wails.flags.cssDragProperty) === window.wails.flags.cssDragValue;
|
||||
var val = window.getComputedStyle(e.target).getPropertyValue(window.wails.flags.cssDragProperty);
|
||||
if (val) {
|
||||
val = val.trim();
|
||||
}
|
||||
return val === window.wails.flags.cssDragValue;
|
||||
};
|
||||
|
||||
window.wails.setCSSDragProperties = function (property, value) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user