-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom jQ Mobile 1.4.3 build gives "$.mobile.textinput is undefined" error during config #103
Comments
@adammessinger Thank you for reporting this issue. However, this is the repository for the jquerymobile.com web site. I will close this and would be grateful if you could reopen this issue under https://github.com/jquery/jquery-mobile/issues/ |
@adammessinger Actually, this may be the correct place if the cause is the download builder... I will reopen for now and will transfer later if this needs to go under jquery-mobile. |
This is the repository that the download builder links to for issue reporting, so if such things don't belong here then that link should be changed. Anyway, I learned that 1.4.4 was released after I posted this. I'll give it another try with that version later tonight to see if it still happens. |
@adammessinger I've reproduced it with 1.4.4. For some reason some parts of jQuery Mobile (including textinput) end up loading after init, so mobileinit will have been triggered by then. js/jquery.mobile.js should prevent this from happening in principle. |
AFAICT this has never worked. i.e., it's not a regression. I've tried custom builds all the way back to 1.1.2, and the triggering of "mobileinit" always ends up earlier than the definition of "mobile.textinput". |
@gseguin I was thinking that it might be better for the download builder to request a bundle like this: config = {
...
exclude: /* jquery and stuff we already exclude */.concat( /* checkboxes that are not checked */ ),
include: "jquery.mobile"
...
}; instead of config = {
...
exclude: /* jquery and stuff */
include: /* checkboxes that are checked */
...
}; So, basically we include "jquery.mobile", and exclude not only jquery, but all the checkboxes the user hasn't checked. That ensures that jquery.mobile.js is used for dependency management. This, in turn, ensures that init goes last, because of the nested define()/require() structure of jquery.mobile.js. I've mostly gotten this to work, but for some reason, when I use @adammessinger's settings with this modification, widgets/forms/textinput is not added to the build, even though both the requested extensions (autogrow and clearBtn) are added to the build. I'm also running into amd-builder problems producing the zipball. All kinds of problems with relative/absolute paths etc. I'll keep investigating, but I thought I'd run this idea by you, because, aside from the missing textinput widget, the build seems to correctly place init at the end. Maybe you know of a better, faster way to implement this, and I'm sure your local amd-builder setup is far more reliable, allowing you to test this include/exclude setup more efficiently. |
@gseguin I've poked around some more, but I'm beginning to think that you can solve this much faster than I can. |
/*
*/ //Called when application is started.
} //Called when user touches our 'explode' button. //Called when a list item is touched. //Make random changes to frequency and effects.
} //Show an animated explosion.
} //Play explosion sound and vibrate. |
In my current jQM project, I'm making changes to $.mobile.textinput.initSelector on mobileinit -- an approach which works fine with the default full build of the framework. With a custom build that includes the textinput widget, I get the error "$.mobile.textinput is undefined".
Here are my checked selections for the custom build:
Animation Complete
jqmData
Defaults
Helpers
Init
Namespace
Support Tests
Orientation support test
Touch support test
Virtual Mouse (vmouse) Bindings
Widget Factory
Page Creation
Navigate
Orientation Change
Throttled Resize
Touch
Events
Buttons: Link-based
Fieldcontainers
Controlgroups
Textarea Autosize
Buttons: Input or button-based
Checkboxes & Radio Buttons
Text Input Clear Button
Form Reset
Selects
Slider
Slidertooltip
Text Inputs & Textareas
Content Management
Base Tag
History Manager
Navigate Method
Navigation Manager
Path Helpers
Content Management
Transition Concurrent
Transition Handlers
Transition Serial
Transition Core
Pop Transition
Degrade Inputs
Link Classes
Match Media Polyfill
“nojs” Classes
Zoom Handling
iOS Orientation Change Fix
First & Last Classes
Collapsible
Collapsible Sets (Accordions)
Toolbars: Fixed
Toolbars: Fixed: Workarounds
Listview
Loading Message
Dialog styling
Panel
Popups
popuparrow
Toolbars: Fixed
The text was updated successfully, but these errors were encountered: