Ext JS requires a viewport meta tag in order to function correctly on mobile devices.

  1. #1

    Ext JS requires a viewport meta tag in order to function correctly on mobile devices.

    Running the following example, on verion 3.3.0, at revision 6755 (latest)
    <!DOCTYPE html>
    <html>
    <head title="Ext.NET">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    </head>
    <body>
        <ext:ResourceManager ScriptMode="Debug" runat="server" />
    </body>
    </html>
    I get the following message on browser's console
    [W] Ext JS requires a viewport meta tag in order to function correctly on mobile devices. Please add the following tag to the <head> of your html page: <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    Click image for larger version. 

Name:	meta001.png 
Views:	173 
Size:	32.4 KB 
ID:	24502

    Any ideas to overcome the issue presented above.

    Thanks in advance.
  2. #2
    Hello Raphael!

    Use <ext:ResourcePlaceHolder /> after the <meta /> tag like this:
    <!DOCTYPE html>
    <html>
    <head title="Ext.NET">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
        <ext:ResourcePlaceHolder runat="server" />
    </head>
    <body>
        <ext:ResourceManager ScriptMode="Debug" runat="server" />
    </body>
    </html>
    I hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hello Raphael!
    Use <ext:ResourcePlaceHolder /> after the <meta /> tag
    FabrÃ*cio, do you mind to expand on that?

    Is it a workaround or it is the way it should be implemented?

    Thanks in advance.
  4. #4
    Any update?
  5. #5
    Hello Raphael!

    Sorry for the delay replying this thread!

    When you add the <ext:ResourceManager /> tag to your aspx page, it means that Ext.NET related scripts and CSS are to be added to your resulting page's <header /> section. It will then be the first thing added to that section.

    In order to manipulate the position, there's the <ext:ResourcePlaceHolder /> tag. So, if you really want the scripts included somewhere not the default, you use it to mark the position the HTML code should be injected by Ext.NET.

    So, this is by design, for simplicity and to try and ensure that with minimal user changes in most cases it will first add the Ext.NET related code.

    But, after all, it really makes sense that maybe Resource Manager also added this meta viewport tag, and that its parameters could be set up from inside the resource manager.
    Fabrício Murta
    Developer & Support Expert
  6. #6
    FabrÃ*cio, once again thank you for your considerations.

    But, after all, it really makes sense that maybe Resource Manager also added this meta viewport tag, and that its parameters could be set up from inside the resource manager.
    It would be very interesting if it were possible to configure it globally, in Web.config <extnet> Global Configuration Properties.
  7. #7
    Okay, Raphael!

    I've logged this as a feature request, #1300.

    Please note that feature requests, although they are issues on github and we find and track them like any bug issues, they do not imply on changes the forum thread's subject nor are moved to the Bugs forums.
    Fabrício Murta
    Developer & Support Expert
  8. #8
    I've logged this as a feature request, #1300.
    Thank you

    Please note that feature requests, although they are issues on github and we find and track them like any bug issues, they do not imply on changes the forum thread's subject nor are moved to the Bugs forums.
    That's ok :)

Similar Threads

  1. Resize grid panel with gestures in mobile devices
    By gerardAlis in forum 2.x Help
    Replies: 1
    Last Post: Aug 20, 2015, 6:27 PM
  2. [CLOSED] combo box for mobile devices
    By rbtceo in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: May 17, 2015, 1:35 AM
  3. Tablet and mobile devices friendly UI?
    By Dimitris in forum Open Discussions
    Replies: 2
    Last Post: Dec 24, 2014, 5:54 AM
  4. [CLOSED] Order GridPanel Groups in an arbitrary order?
    By dmoore in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 27, 2013, 4:35 AM
  5. Replies: 0
    Last Post: Aug 24, 2011, 12:13 AM

Posting Permissions