locked
Slider is not completely disabled by setting the disabled attribute to true

    Question

  • Hello,

    If we disable the slider like this:

    <input type="range" disabled min="0" max="100"/> 

    and then we still try to drag the thumb of the slider.

    You will find that other elements on the same page do not respond to user actions(e.g. clicks).

    I guess the thumb still tries to grab the capture because the behavior disappears after I double click on somewhere.

    Is it a bug or else?

    By the way, I'm using 8400 build.

    Thursday, July 12, 2012 6:41 AM

Answers

  • OK, what you are seeing is simply a painting problem.  The control is not getting disabled.  You will notice if you obscure the view and let it repaint the text has changed.

    There is similar bug in our system that has been marked as fixed for the next release.

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, July 25, 2012 7:02 PM
    Moderator

All replies

  • Can you provide a repro of this and specific tests?  This does not repro for me with a simple blank application with a <textarea> and <button> elements.

    Jeff Sanders (MSFT)

    Thursday, July 12, 2012 2:43 PM
    Moderator
  • I can reproduce it with IE.

    Just paste the following code in Tryit Editor at W3school:

    <!DOCTYPE html>
    <html>
    <body>
    
    <form action="demo_form.asp" method="get">
    Points: <input type="range" name="points" min="1" max="10" disabled/>
    <input type="submit" />
    </form>
    
    </body>
    </html>
    If you drag the thumb of the slider, and then click the submit button, you can see that the button does not respond to your click.
    Friday, July 13, 2012 2:30 PM
  • Can you give me something that repro's in a Metro style app (this does not)?

    The IE forum would be the best place to post IE issues.

    -Jeff


    Jeff Sanders (MSFT)

    Friday, July 13, 2012 6:35 PM
    Moderator
  • OK.

    Let me give a sample:

    1. Create a Javascript Metro style blank app.

    2. <body> of default.html

        <p id="para">Content goes here</p>
        <input id="sld" type="range"/>
        <button id="btn">Click to change text</button>
        <button id="btnEnabler">enable/disable slider</button>

    3. In default.js, add two event listeners within if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated)

                    btn.addEventListener("click",
                        function () {
                            para.innerText = "Content changed";
                        },
                        false
                    );
    
                    btnEnabler.addEventListener("click",
                        function () {
                            sld.disabled = !sld.disabled;
                        },
                        false
                    );

    Here are the steps to reproduce it:

    1. disable the slider using the btnEnabler

    2. drag the thumb of the slider

    3. click the button that can change the text

    4. the "Content goes here" text is not changed

    Thanks.

    • Edited by noobrocks Monday, July 16, 2012 3:14 AM
    Monday, July 16, 2012 3:09 AM
  • I'm unable to reproduce this issue using excatly the same code on build 8400. The slider is disabled, I can't drag the thumb, and the text is changed after clicking the left button. Can you try again?
    Tuesday, July 17, 2012 10:45 AM
  • Hi Name-Dis,

    I know it's disabled.

    The key to the issue is that after the step 1, you still try to drag the thumb even though the thumb won't be moved.

    Then you proceed with the steps mentioned. The issue occurs.

    Tuesday, July 17, 2012 11:32 AM
  • I cannot reproduce this either.

    Perhaps we are missing some steps or your code/repro is not accurate?


    Jeff Sanders (MSFT)

    Tuesday, July 17, 2012 7:35 PM
    Moderator
  • Can't believe it! I feel at a loss. >_<

    I put the files used for reproducing the issue here(Skydrive).

    Note that you have to left click the button.

    If you still cannot reproduce the issue, I will end the thread myself.

    Thank for your patience.

    • Edited by noobrocks Wednesday, July 18, 2012 2:19 AM
    Wednesday, July 18, 2012 2:17 AM
  • I’m able to reproduce this issue on one machine, but not the other. If you think it’s a bug, you can post it on http://connect.microsoft.com/visualstudio.
    Wednesday, July 18, 2012 10:52 AM
  • I agree. This is totally a bug and it is extremely easy to reproduce on every machine I've tried and in the simulator. I am also using Build 8400.

    Just stick this HTML on any Metro style app or web page:

    <input type="range" disabled />

    Once any range input element is disabled, if a user tries to interact with it by dragging the thumb, then it correctly does not respond to input (because it's disabled) which is good, BUT ALL OTHER INPUT STOPS RESPONDING AS WELL until after clicking a few times or until the range input is enabled again. It's as if the thumb/track/input has captured the mouse/pointer focus and won't give it up...

    Please Microsoft, try harder to repro this and fix it before the Win8 RTM. This bug is going to bite a lot of people.






    • Edited by billyzkid Thursday, July 19, 2012 1:42 AM
    Thursday, July 19, 2012 1:36 AM
  • Hi Billy,

    I have tried on several machines and in the simulator.  Without a reliable repro there is no way to fix the issue you are experiencing.  Perhaps you are using a different version of the framework?  Choose HELP, About... and let us know what versions you are using (you can use the snipping tool and grab the whole dialog box and post it). Perhaps you are on a machine/os with different specs?

    -Jeff


    Jeff Sanders (MSFT)

    Thursday, July 19, 2012 12:24 PM
    Moderator
  • Hi Jeff,

    I uploaded additionalInfo.zip here.

    It contains a video for reproducing the issue, DxDiag and version info of Visual Studio installed.

    Hope this helps.

    Thanks.

    Thursday, July 19, 2012 1:35 PM
  • Try this update first:

    http://www.microsoft.com/en-us/download/details.aspx?id=30178&amp;ocid=aff-n-we-loc--ITPRO40886&amp;WT.mc_id=aff-n-we-loc--ITPRO40886

    That is the version I am running and you are running an earlier version.

    After update your version should be:

    Microsoft Visual Studio Express 2012 RC for Windows 8
    Version 11.0.50522.1 RCREL
    Microsoft .NET Framework
    Version 4.5.50501

    Installed Version: VSWin Express

    Microsoft Visual Basic 2012 RC   04313-004-0009005-02434
    Microsoft Visual Basic 2012 RC

    Microsoft Visual C# 2012 RC   04313-004-0009005-02434
    Microsoft Visual C# 2012 RC

    Microsoft Visual C++ 2012 RC   04313-004-0009005-02434
    Microsoft Visual C++ 2012 RC

    Microsoft Visual Studio 2012 RC Code Analysis Spell Checker   04313-004-0009005-02434
    Microsoft® Visual Studio® 2012 RC Code Analysis Spell Checker

    Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

    The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

    Microsoft Visual Studio 2012 Team Explorer RC   04313-004-0009005-02434
    Microsoft Visual Studio 2012 Team Explorer RC

    Microsoft Visual Web Developer 2012 RC   04313-004-0009005-02434
    Microsoft Visual Web Developer 2012 RC

    NuGet Package Manager   1.8.30423.9026
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.


    Jeff Sanders (MSFT)

    Thursday, July 19, 2012 1:40 PM
    Moderator
  • PS, your repro is totally different (in the video) from what you have been speaking about.  You have a button to disable the slider...   Is this the only way you can repro (I still cannot repro that way)?

    Jeff Sanders (MSFT)


    Thursday, July 19, 2012 4:28 PM
    Moderator
  • PS, your repro is totally different (in the video) from what you have been speaking about.  You have a button to disable the slider...   Is this the only way you can repro (I still cannot repro that way)?

    Jeff Sanders (MSFT)


    The repo steps are somewhat different from those mentioned in the beginning, since the issue is gone by disabling the slider in the html.

    The issue is reproducible as long as I programmtically disable the slider.

    Besides, after I update my VS, the issue still exists.

    Here is my new version info:

    Microsoft Visual Studio Ultimate 2012 RC
    Version 11.0.50706.0 QRELRC July 2012
    Microsoft .NET Framework
    Version 4.5.50501

    Installed Version: Ultimate

    Architecture and Modeling Tools   04166-004-0009005-02205
    Architecture and Modeling Tools
       
    UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

    LightSwitch for Microsoft Visual Studio 2012 RC   04166-004-0009005-02205
    LightSwitch for Microsoft Visual Studio 2012 RC

    Microsoft Office Developer Tools   04166-004-0009005-02205
    Microsoft Office Developer Tools

    Microsoft Visual Basic 2012 RC   04166-004-0009005-02205
    Microsoft Visual Basic 2012 RC

    Microsoft Visual C# 2012 RC   04166-004-0009005-02205
    Microsoft Visual C# 2012 RC

    Microsoft Visual C++ 2012 RC   04166-004-0009005-02205
    Microsoft Visual C++ 2012 RC

    Microsoft Visual F# 2012   04166-004-0009005-02205
    Microsoft Visual F# 2012

    Microsoft Visual Studio 2012 RC Code Analysis Spell Checker   04166-004-0009005-02205
    Microsoft® Visual Studio® 2012 RC Code Analysis Spell Checker

    Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

    The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

    Microsoft Visual Studio 2012 SharePoint Developer Tools   04166-004-0009005-02205
    Microsoft Visual Studio 2012 SharePoint Developer Tools

    Microsoft Visual Studio 2012 Team Explorer RC   04166-004-0009005-02205
    Microsoft Visual Studio 2012 Team Explorer RC

    Microsoft Visual Web Developer 2012 RC   04166-004-0009005-02205
    Microsoft Visual Web Developer 2012 RC

    Microsoft SQL Server Data Tools   11.1.20425.00
    Microsoft SQL Server Data Tools

    NuGet Package Manager   1.8.30423.9026
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

    PreEmptive Analytics Visualizer   1.0
    Visual Studio 11 extension to visualize aggregated summaries from the PreEmptive Analytics product.

    Web Tooling Extensions RC   1.0
    Page Inspector: Tool that offers an efficient way to decompose Web Applications and diagnose front-end issues.
    Web Publishing: Extensions required for Web Publishing for both hosted servers as well as on premises.
    Web Form Templates: Includes the default templates for Web Form Applications.
    Editor Extensions: Includes HTML, CSS, and JS editor extensions that greatly enhance the development experience.

    Friday, July 20, 2012 2:49 AM
  • OK, what you are seeing is simply a painting problem.  The control is not getting disabled.  You will notice if you obscure the view and let it repaint the text has changed.

    There is similar bug in our system that has been marked as fixed for the next release.

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, July 25, 2012 7:02 PM
    Moderator