[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:
stffabi
2022-10-18 10:28:59 +02:00
committed by GitHub
parent d9e077389c
commit 39addf2011
3 changed files with 12 additions and 4 deletions
+5 -1
View File
@@ -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