[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
commit 39addf2011
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

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