mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01: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:
parent
d9e077389c
commit
39addf2011
3 changed files with 12 additions and 4 deletions
|
|
@ -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
Loading…
Add table
Add a link
Reference in a new issue