question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Drag is applying to entire window using gui=mshtml

See original GitHub issue

Specification

  • pywebview version: 3.4
  • platform / version: Windows 10 2004

Description

I want the user to be able to select numbers/text in some input field. Doing this, by what I’d normally do, is dragging over the content of such input field to select it, in order to either delete or edit. Sure I can double-click on it instead, but that’s not the point.

All goes well using gui='cef'. But just to make this function properly, will add ~60mb to the compiled version in the end, so I prefer using mshtml instead.

gui='edgehtml' is buggy as mentioned here. gui='edgechromium' needs dependency > .NET Framework 4.6.2 and Edge Runtime installed mentioned here.

Using gui='mshtml' results in unable to text select because the drag applies to the entire window. Whenever I try to select input text, it instead drags the window.

I’m aware of issue #315 but this applies to macOS and Frameless windows. I’ve played around with text_select with no luck, either text_select=True or False. Also followed up the example, adding a class to input, but issue remains.

main.py:

import webview

if __name__ == '__main__':
    webview.create_window('Example', 'index.html', text_select=True)
    webview.start(debug=True, gui='mshtml')

index.html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Example</title>
</head>
<body>
    <input>
    <input type='number'>	
</body>
</html>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
r0x0rcommented, Jan 8, 2021

This issue is fixed in master. Easy-drag does not work at all with other Windows renderers. This should be fixed as well.

1reaction
r0x0rcommented, Jan 7, 2021

This is clearly a bug, I will look into this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML5 drag and drop between windows - Stack Overflow
I just opened this demo in two separate browser windows, and I can drag ... the draggable property set or something else that...
Read more >
Implementing Drag and Drop in Your Windows Application
One of the important features of Graphical User Interfaces (GUI) is drag and drop. Using a mouse you can drag and drop a...
Read more >
To perform a drag-and-drop procedure between applications
Learn how to perform drag-and-drop operations between applications by using an established "contract" between two properties.
Read more >
GOP Lawmakers Aim to Criminalize Drag Shows Where ...
Republicans in multiple states are claiming drag performances are ... The push to ban drag shows in part or in full took on...
Read more >
Mayor Breed announces application launch for San ...
The program was first announced in June as part of Mayor Breed's then ... Those who want to apply to be the City's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found