You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "I D (JIRA)" <ji...@apache.org> on 2015/11/11 17:02:10 UTC

[jira] [Commented] (TAP5-2514) Bootstrap library dependencies not loaded on Firefox

    [ https://issues.apache.org/jira/browse/TAP5-2514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15000569#comment-15000569 ] 

I D commented on TAP5-2514:
---------------------------

Sometimes the dependency IS loaded, eventually, but not before the module depending on it (i.e. a race condition, which could explain the cross-browser differences).

> Bootstrap library dependencies not loaded on Firefox
> ----------------------------------------------------
>
>                 Key: TAP5-2514
>                 URL: https://issues.apache.org/jira/browse/TAP5-2514
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.4
>            Reporter: I D
>
> This issue was introduced by [this commit|https://github.com/apache/tapestry-5/commit/af356865f29b721c61f1753b62ea012fd5d6abc4].
> Steps to reproduce:
> 1. Create your own trivial js module (e.g. a no-op module named "no-op").
> 1. In your module, require "bootstrap/popover" by including it in the array passed as the first parameter to the define() call.
> 1. Load your module from any page, using JavascriptSupport.require().
> 1. Open the page in firefox. Open the debugger and note that popover.js was loaded, while tooltip wasn't. Also note the js exception thrown by popover.js: "popover requires tooltip.js".
> This has also been observed on chrome, but sporadically.
> Workaround: add this code to AppModule or any of its submodules (essentially reverts the commit that introduced the issue):
> {code:java}
> @Contribute(ModuleManager.class)
> public static void setupBaseModules(MappedConfiguration<String, Object> configuration, @Path("${" + SymbolConstants.BOOTSTRAP_ROOT + "}/js/transition.js") Resource transition) {
>     configuration.override("bootstrap/transition", new JavaScriptModuleConfiguration(transition).dependsOn("jquery"));
>     for (String name : new String[]{"affix", "alert", "button", "carousel", "collapse", "dropdown", "modal", "scrollspy", "tab", "tooltip"}) {
>         Resource lib = transition.forFile(name + ".js");
>         configuration.override("bootstrap/" + name, new JavaScriptModuleConfiguration(lib).dependsOn("bootstrap/transition"));
>     }
>     Resource popover = transition.forFile("popover.js");
>     configuration.override("bootstrap/popover", new JavaScriptModuleConfiguration(popover).dependsOn("bootstrap/tooltip"));
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)