Code Monkey home page Code Monkey logo

Comments (5)

Maniiisha-sachdeva avatar Maniiisha-sachdeva commented on May 18, 2024

here is the main code..
function showAlert() {
alert("This is a test alert.");
window.focus();
}
function showPopupAndFocusInput() {
alert("This is a test alert.");
document.getElementById("myInput").focus();
window.focus();
}

from electron.

Prinzhorn avatar Prinzhorn commented on May 18, 2024

I can confirm this on Ubuntu, however, I cannot confirm the claim that this has always been this way. The Fiddle works perfectly fine for me with v28.2.7 and breaks starting with v29.0.0-alpha.1. v27.3.6 and v26.6.10 also work for me.

from electron.

LqdBcnAtWork avatar LqdBcnAtWork commented on May 18, 2024

I can confirm this on Ubuntu, however, I cannot confirm the claim that this has always been this way. The Fiddle works perfectly fine for me with v28.2.7 and breaks starting with v29.0.0-alpha.1. v27.3.6 and v26.6.10 also work for me.

I would not be surprised if Windows changed something that broke it for Electron.

@Maniiisha-sachdeva are you implying that calling window.focus(); after a popup will repair this focus issue?

I'll have to try this on Monday.

from electron.

LqdBcnAtWork avatar LqdBcnAtWork commented on May 18, 2024

I tried calling window.focus and .focus on an input element, and neither fixed the focus issue.

Also tried these versions:
(just the alert/confirm bug, not the focus function)

version       worked
28.2.7        ❌
27.3.6        ❌
26.6.10       ❌
21.0.0-beta.3 ❌ //the version of 21 that I noticed the issue with previously.
24.1.0        ❌ //version I had bumped the project to from 21.

Seeing that v28, v27 and v26 failed for me but not @Prinzhorn, I believe this is primarily a Windows issue. I can't test other versions of Windows unfortunatly. But I find it quite bizarre that it stops working on Ubuntu with v29.

Either way it's reassuring that it's not just me and my code. I'll have to implement a workaround for now.

edit: changed emoji for clarity.

from electron.

m-eraf avatar m-eraf commented on May 18, 2024

in this when i changed the input type to number then i am able to change the number by its up and down arrow but not able to type in it and as i am switching the tab its started working can i work on it further?

from electron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.